Class StringUtil
- java.lang.Object
-
- com.healthmarketscience.jackcess.impl.StringUtil
-
public final class StringUtil extends Object
String manipulation utilities.- Author:
- James Ahlborn
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcapitalizeFully(String text, Locale locale)static booleanisBlank(String str)static booleanisEmpty(String str)static Stringremove(String str, char c)static Stringreplace(String str, String target, String replacement)static booleanstartsWithIgnoreCase(String str, String prefix)static StringtoLowerCase(String str)The lower case counterpart oftoUpperCase(java.lang.String).static StringtoUpperCase(String str)Converts in the root locale, which is what a value compared against the database rather than shown to a user needs.static StringtrimToNull(String str)static Stringtruncate(String str, int maxLength)
-
-
-
Method Detail
-
isEmpty
public static boolean isEmpty(String str)
-
isBlank
public static boolean isBlank(String str)
-
toUpperCase
public static String toUpperCase(String str)
Converts in the root locale, which is what a value compared against the database rather than shown to a user needs. The locale default would turn an "i" into "İ" in Turkish.- Returns:
- the given string in upper case, or null if it is null
-
toLowerCase
public static String toLowerCase(String str)
The lower case counterpart oftoUpperCase(java.lang.String).- Returns:
- the given string in lower case, or null if it is null
-
truncate
public static String truncate(String str, int maxLength)
- Returns:
- the given string, cut to the given length if it is longer than that, and unchanged if it is null
-
-