Class CharSequenceUtil
java.lang.Object
jodd.util.CharSequenceUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancompare(CharSequence charSequence, CharSequence chars, int length) static booleanequals(CharSequence charSequence1, CharSequence charSequence2) static booleanequalsIgnoreCase(CharSequence charSequence1, CharSequence charSequence2) static booleanequalsOne(char c, CharSequence match) Match if one character equals to any of the given character.static booleanequalsToLowercase(CharSequence charSequence, 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(CharSequence source, int index, 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(CharSequence source, int index, CharSequence match) Finds index of the first character in given charsequence the matches any from the given set of characters.static booleanstartsWithLowercase(CharSequence charSequence, CharSequence chars)
-
Constructor Details
-
CharSequenceUtil
public CharSequenceUtil()
-
-
Method Details
-
equals
-
equalsToLowercase
-
startsWithLowercase
-
compare
-
equalsIgnoreCase
-
equalsOne
Match if one character equals to any of the given character.- Returns:
trueif characters match any character from given array, otherwisefalse
-
findFirstEqual
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
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
-