java.lang.Object
org.firebirdsql.jaybird.util.StringUtils
Helper class for string operations
- Since:
- 4
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isNullOrEmpty
(@Nullable String value) Checks ifvalue
isnull
or empty.static @Nullable String
Null-safe trim.static @Nullable String
trimToNull
(@Nullable String value) Trimsvalue
if non-null, returning the trimmed value, ornull
ifvalue
wasnull
or empty after trimming.
-
Method Details
-
trimToNull
Trimsvalue
if non-null, returning the trimmed value, ornull
ifvalue
wasnull
or empty after trimming.- Parameters:
value
- value to trim- Returns:
- Trimmed string
value
, ornull
when null, or empty after trim. - See Also:
-
isNullOrEmpty
Checks ifvalue
isnull
or empty.- Parameters:
value
- value to test- Returns:
true
ifvalue
isnull
or emoty,false
for non-empty strings- Since:
- 6
-
trim
Null-safe trim.- Parameters:
stringToTrim
- String to trim- Returns:
- result of
stringToTrim.trim()
(ornull
ifstringToTrim
was null - Since:
- 6
-