public final class Strings
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
Character_isHighSurrogate(char ch) |
static boolean |
containsAny(java.lang.CharSequence cs,
char[] searchChars)
Checks if the CharSequence contains any character in the given set of characters.
|
static boolean |
containsAny(java.lang.CharSequence cs,
java.lang.CharSequence searchChars)
Checks if the CharSequence contains any character in the given set of characters.
|
static int |
countMatches(java.lang.CharSequence str,
java.lang.CharSequence sub)
Counts how many times the substring appears in the larger string.
|
static boolean |
equalsAny(java.lang.CharSequence cs,
java.lang.CharSequence[] strs)
Checks if the CharSequence equals any character in the given set of characters.
|
static boolean |
isEmpty(java.lang.CharSequence cs)
Checks if a CharSequence is empty ("") or null.
|
public static boolean equalsAny(java.lang.CharSequence cs, java.lang.CharSequence[] strs)
cs
- the CharSequence to checkstrs
- the set of characterspublic static boolean containsAny(java.lang.CharSequence cs, java.lang.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 boolean containsAny(java.lang.CharSequence cs, 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 Character_isHighSurrogate(char ch)
ch
- public static boolean isEmpty(java.lang.CharSequence cs)
cs
- the CharSequence to check, may be nulltrue
if the CharSequence is empty or nullpublic static int countMatches(java.lang.CharSequence str, java.lang.CharSequence sub)
str
- the CharSequence to check, may be nullsub
- the substring to count, may be nullnull