Package org.basex.util
Class SmartStrings
java.lang.Object
org.basex.util.SmartStrings
This class provides convenience operations for smart string comparisons.
If query strings and character are lower case, search will be case insensitive.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if a string contains the specified substring.static booleanChecks if all characters of the specified substring occur in a string in the given order.static booleanstartsWith(String string, String sub) Checks if a string starts with the specified substring.
-
Method Details
-
startsWith
Checks if a string starts with the specified substring.- Parameters:
string- stringsub- substring- Returns:
- result of check
-
contains
Checks if a string contains the specified substring.- Parameters:
string- stringsub- substring- Returns:
- result of check
-
matches
Checks if all characters of the specified substring occur in a string in the given order.- Parameters:
string- stringsub- substring- Returns:
- result of check
-