Package com.networknt.schema.utils
Class Strings
java.lang.Object
com.networknt.schema.utils.Strings
Utility methods for working with Strings.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsNonAsciiWhitespace(String string) Whether the given string contains a non-ASCII whitespace character such asU+00A0NON-BREAKING SPACE.static booleanstatic booleanstatic booleanstatic booleanstatic String[]Split text.
-
Method Details
-
isInteger
-
isBoolean
-
isNumeric
-
isBlank
-
split
Split text. Unlike the JDK String split using regex trailing delimiters are preserved.- Parameters:
text- the text to splitdelimiter- the delimiter- Returns:
- the fragments
-
containsNonAsciiWhitespace
Whether the given string contains a non-ASCII whitespace character such asU+00A0NON-BREAKING SPACE. Note thatCharacter.isWhitespace(int)deliberately excludesU+00A0, hence the additionalCharacter.isSpaceChar(int)check.- Parameters:
string- the string to test, may be null- Returns:
- true if the string contains a non-ASCII whitespace character
-