| java.lang.Object jodd.util.CharUtil
CharUtil | public class CharUtil (Code) | | Various character utilities.
|
Method Summary | |
public static boolean | equalsOne(char c, char[] match) Match if one character equals to any of the given character. | public static int | findFirstDiff(char[] source, int index, char[] match) Finds index of the first character in given array the differes from the
given set of characters. | public static int | findFirstDiff(char[] source, int index, char match) Finds index of the first character in given array the differes from the
given set of characters. | public static int | findFirstEqual(char[] source, int index, char[] match) Finds index of the first character in given array the matches any from the
given set of characters. | public static int | findFirstEqual(char[] source, int index, char match) Finds index of the first character in given array the matches any from the
given set of characters. | public static boolean | isLowerAscii(char c) Returns true if specified character is lowercase ascii. | public static boolean | isUpperAscii(char c) Returns true if specified character is uppercase ascii. | public static byte[] | toByteArray(char[] carr) Converts char array into byte array. | public static char[] | toCharArray(byte[] barr) Converts byte array to char array. | public static char | toLowerAscii(char c) Lowers upercase ascii char. | public static char | toUpperAscii(char c) Uppers lowercase ascii char. |
equalsOne | public static boolean equalsOne(char c, char[] match)(Code) | | Match if one character equals to any of the given character.
true if characters match any chararacter from given array,otherwise false |
findFirstDiff | public static int findFirstDiff(char[] source, int index, char[] match)(Code) | | Finds index of the first character in given array the differes from the
given set of characters.
index of matched character or -1 |
findFirstDiff | public static int findFirstDiff(char[] source, int index, char match)(Code) | | Finds index of the first character in given array the differes from the
given set of characters.
index of matched character or -1 |
findFirstEqual | public static int findFirstEqual(char[] source, int index, char[] match)(Code) | | Finds index of the first character in given array the matches any from the
given set of characters.
index of matched character or -1 |
findFirstEqual | public static int findFirstEqual(char[] source, int index, char match)(Code) | | Finds index of the first character in given array the matches any from the
given set of characters.
index of matched character or -1 |
isLowerAscii | public static boolean isLowerAscii(char c)(Code) | | Returns true if specified character is lowercase ascii.
If user uses only ASCIIs, it is much much faster.
|
isUpperAscii | public static boolean isUpperAscii(char c)(Code) | | Returns true if specified character is uppercase ascii.
If user uses only ASCIIs, it is much much faster.
|
toByteArray | public static byte[] toByteArray(char[] carr)(Code) | | Converts char array into byte array. Chars are truncated to byte size.
|
toCharArray | public static char[] toCharArray(byte[] barr)(Code) | | Converts byte array to char array.
|
toLowerAscii | public static char toLowerAscii(char c)(Code) | | Lowers upercase ascii char.
|
toUpperAscii | public static char toUpperAscii(char c)(Code) | | Uppers lowercase ascii char.
|
|
|