Package org.basex.util
Class SmartStrings
- java.lang.Object
-
- org.basex.util.SmartStrings
-
public final class SmartStrings extends Object
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-23, BSD License, Christian Gruen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
charsOccurIn(String string, String sub)
Checks if all characters of the specified substring occur in a string in the given order.static boolean
contains(String string, String sub)
Checks if a string contains the specified substring.static boolean
startsWith(String string, String sub)
Checks if a string starts with the specified substring.
-
-
-
Method Detail
-
startsWith
public static boolean startsWith(String string, String sub)
Checks if a string starts with the specified substring.- Parameters:
string
- stringsub
- substring- Returns:
- result of check
-
contains
public static boolean contains(String string, String sub)
Checks if a string contains the specified substring.- Parameters:
string
- stringsub
- substring- Returns:
- result of check
-
-