-
public final class StringsString helper
-
-
Method Summary
Modifier and Type Method Description static booleanequalsAny(CharSequence cs, Array<CharSequence> strs)Checks if the CharSequence equals any character in the given set of characters. static booleancontainsAny(CharSequence cs, CharSequence searchChars)Checks if the CharSequence contains any character in the given set of characters. static booleancontainsAny(CharSequence cs, Array<char> searchChars)Checks if the CharSequence contains any character in the given set of characters. static booleanisEmpty(CharSequence cs)Checks if a CharSequence is empty ("") or null. static intcountMatches(CharSequence str, CharSequence sub)Counts how many times the substring appears in the larger string. -
-
Method Detail
-
equalsAny
static boolean equalsAny(CharSequence cs, Array<CharSequence> strs)
Checks if the CharSequence equals any character in the given set of characters.
- Parameters:
cs- the CharSequence to check
-
containsAny
static boolean containsAny(CharSequence cs, CharSequence searchChars)
Checks if the CharSequence contains any character in the given set of characters.
- Parameters:
cs- the CharSequence to check, may be nullsearchChars- the chars to search for, may be null
-
containsAny
static boolean containsAny(CharSequence cs, Array<char> searchChars)
Checks if the CharSequence contains any character in the given set of characters.
- Parameters:
cs- the CharSequence to check, may be nullsearchChars- the chars to search for, may be null
-
isEmpty
static boolean isEmpty(CharSequence cs)
Checks if a CharSequence is empty ("") or null.
- Parameters:
cs- the CharSequence to check, may be null
-
countMatches
static int countMatches(CharSequence str, CharSequence sub)
Counts how many times the substring appears in the larger string.
- Parameters:
str- the CharSequence to check, may be nullsub- the substring to count, may be null
-
-
-
-