public final class Strings extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
Character_isHighSurrogate(char ch) |
static boolean |
containsAny(CharSequence cs,
char[] searchChars)
Checks if the CharSequence contains any character in the given set of characters.
|
static boolean |
containsAny(CharSequence cs,
CharSequence searchChars)
Checks if the CharSequence contains any character in the given set of characters.
|
static int |
countMatches(CharSequence str,
CharSequence sub)
Counts how many times the substring appears in the larger string.
|
static boolean |
equalsAny(CharSequence cs,
CharSequence[] strs)
Checks if the CharSequence equals any character in the given set of characters.
|
static boolean |
isEmpty(CharSequence cs)
Checks if a CharSequence is empty ("") or null.
|
public static boolean Character_isHighSurrogate(char ch)
ch
- public static boolean containsAny(@Nullable CharSequence cs, @Nullable char[] searchChars)
cs
- the CharSequence to check, may be nullsearchChars
- the chars to search for, may be nulltrue
if any of the chars are found, false
if no match or null inputpublic static boolean containsAny(@Nullable CharSequence cs, @Nullable CharSequence searchChars)
cs
- the CharSequence to check, may be nullsearchChars
- the chars to search for, may be nulltrue
if any of the chars are found, false
if no match or null inputpublic static int countMatches(@Nullable CharSequence str, @Nullable CharSequence sub)
str
- the CharSequence to check, may be nullsub
- the substring to count, may be nullnull
public static boolean equalsAny(@Nullable CharSequence cs, @Nullable CharSequence[] strs)
cs
- the CharSequence to checkstrs
- the set of characterspublic static boolean isEmpty(@Nullable CharSequence cs)
cs
- the CharSequence to check, may be nulltrue
if the CharSequence is empty or null