Package com.strobel.core
Class StringUtilities
java.lang.Object
com.strobel.core.StringUtilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static int
compare
(String s1, String s2, StringComparison comparison) static String
static String
private static boolean
contains
(char[] array, char value) static boolean
endsWith
(CharSequence value, CharSequence suffix) static boolean
endsWithIgnoreCase
(CharSequence value, String suffix) static boolean
static boolean
equals
(String s1, String s2, StringComparison comparison) static String
escape
(char ch) static String
escape
(char ch, boolean quote) static String
escape
(char ch, boolean quote, boolean isUnicodeSupported) static String
static String
static String
private static String
escapeCharacter
(char ch, boolean isUnicodeSupported) static String
escapeIdentifier
(String value, boolean isUnicodeSupported) static int
static int
static int
getUtf8ByteCount
(String value) static boolean
static boolean
static boolean
static boolean
static String
static String
static String
static String
static String
removeLeft
(String value, char[] removeChars) static String
removeLeft
(String value, String prefix) static String
removeLeft
(String value, String prefix, boolean ignoreCase) static String
removeRight
(String value, char[] removeChars) static String
removeRight
(String value, String suffix) static String
removeRight
(String value, String suffix, boolean ignoreCase) static String
repeat
(char ch, int length) private static boolean
shouldEscape
(char ch, boolean quote, boolean isUnicodeSupported) static boolean
startsWith
(CharSequence value, CharSequence prefix) static boolean
startsWithIgnoreCase
(CharSequence value, String prefix) static boolean
substringEquals
(CharSequence value, int offset, CharSequence comparand, int comparandOffset, int substringLength) static boolean
substringEquals
(CharSequence value, int offset, CharSequence comparand, int comparandOffset, int substringLength, StringComparison comparison) static String
trimAndRemoveLeft
(String value, char[] removeChars) static String
trimAndRemoveLeft
(String value, String prefix) static String
trimAndRemoveLeft
(String value, String prefix, boolean ignoreCase) static String
trimAndRemoveRight
(String value, char[] removeChars) static String
trimAndRemoveRight
(String value, String suffix) static String
trimAndRemoveRight
(String value, String suffix, boolean ignoreCase) static String
static String
-
Field Details
-
EMPTY
- See Also:
-
_comparators
-
-
Constructor Details
-
StringUtilities
private StringUtilities()
-
-
Method Details
-
isNullOrEmpty
-
equals
-
equals
-
compare
-
compare
-
getHashCode
-
getHashCodeIgnoreCase
-
isNullOrWhitespace
-
startsWith
-
startsWithIgnoreCase
-
endsWith
-
endsWithIgnoreCase
-
concat
-
concat
-
join
-
join
-
substringEquals
public static boolean substringEquals(CharSequence value, int offset, CharSequence comparand, int comparandOffset, int substringLength) -
substringEquals
public static boolean substringEquals(CharSequence value, int offset, CharSequence comparand, int comparandOffset, int substringLength, StringComparison comparison) -
isTrue
-
isFalse
-
removeLeft
-
removeLeft
-
removeLeft
-
removeRight
-
removeRight
-
removeRight
-
padLeft
-
padRight
-
trimLeft
-
trimRight
-
trimAndRemoveLeft
-
trimAndRemoveLeft
-
trimAndRemoveLeft
-
trimAndRemoveRight
-
trimAndRemoveRight
-
trimAndRemoveRight
-
getUtf8ByteCount
-
escape
-
escapeCharacter
-
escape
-
escape
-
escape
-
escape
-
escape
-
escapeIdentifier
-
shouldEscape
private static boolean shouldEscape(char ch, boolean quote, boolean isUnicodeSupported) -
repeat
-
split
-
split
-
split
-
split
-
contains
private static boolean contains(char[] array, char value)
-