java.lang.Object
org.firebirdsql.jaybird.util.StringUtils
Helper class for string operations
- Since:
- 4
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNullOrEmpty(@Nullable String value) Checks ifvalueisnullor empty.static @Nullable StringNull-safe trim.static @Nullable StringtrimToNull(@Nullable String value) Trimsvalueif non-null, returning the trimmed value, ornullifvaluewasnullor empty after trimming.
-
Method Details
-
trimToNull
Trimsvalueif non-null, returning the trimmed value, ornullifvaluewasnullor empty after trimming.- Parameters:
value- value to trim- Returns:
- Trimmed string
value, ornullwhen null, or empty after trim. - See Also:
-
isNullOrEmpty
Checks ifvalueisnullor empty.- Parameters:
value- value to test- Returns:
trueifvalueisnullor emoty,falsefor non-empty strings- Since:
- 6
-
trim
Null-safe trim.- Parameters:
stringToTrim- String to trim- Returns:
- result of
stringToTrim.trim()(ornullifstringToTrimwas null - Since:
- 6
-