Package jodd.util
Class CharSequenceUtil
- java.lang.Object
-
- jodd.util.CharSequenceUtil
-
public class CharSequenceUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CharSequenceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanequals(java.lang.CharSequence charSequence1, java.lang.CharSequence charSequence2)static booleanequalsIgnoreCase(java.lang.CharSequence charSequence1, java.lang.CharSequence charSequence2)static booleanequalsOne(char c, java.lang.CharSequence match)Match if one character equals to any of the given character.static booleanequalsToLowercase(java.lang.CharSequence charSequence, java.lang.CharSequence name)static intfindFirstDiff(char[] source, int index, char match)Finds index of the first character in given array the differs from the given set of characters.static intfindFirstDiff(java.lang.CharSequence source, int index, java.lang.CharSequence match)Finds index of the first character in given charsequence the differs from the given set of characters.static intfindFirstEqual(char[] source, int index, char match)Finds index of the first character in given array the matches any from the given set of characters.static intfindFirstEqual(java.lang.CharSequence source, int index, java.lang.CharSequence match)Finds index of the first character in given charsequence the matches any from the given set of characters.static booleanstartsWithLowercase(java.lang.CharSequence charSequence, java.lang.CharSequence chars)
-
-
-
Method Detail
-
equals
public static boolean equals(java.lang.CharSequence charSequence1, java.lang.CharSequence charSequence2)
-
equalsToLowercase
public static boolean equalsToLowercase(java.lang.CharSequence charSequence, java.lang.CharSequence name)
-
startsWithLowercase
public static boolean startsWithLowercase(java.lang.CharSequence charSequence, java.lang.CharSequence chars)
-
equalsIgnoreCase
public static boolean equalsIgnoreCase(java.lang.CharSequence charSequence1, java.lang.CharSequence charSequence2)
-
equalsOne
public static boolean equalsOne(char c, java.lang.CharSequence match)Match if one character equals to any of the given character.- Returns:
trueif characters match any character from given array, otherwisefalse
-
findFirstEqual
public static int findFirstEqual(java.lang.CharSequence source, int index, java.lang.CharSequence match)Finds index of the first character in given charsequence the matches any from the given set of characters.- Returns:
- index of matched character or -1
-
findFirstEqual
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.- Returns:
- index of matched character or -1
-
findFirstDiff
public static int findFirstDiff(java.lang.CharSequence source, int index, java.lang.CharSequence match)Finds index of the first character in given charsequence the differs from the given set of characters.- Returns:
- index of matched character or -1
-
findFirstDiff
public static int findFirstDiff(char[] source, int index, char match)Finds index of the first character in given array the differs from the given set of characters.- Returns:
- index of matched character or -1
-
-