Class Strings
java.lang.Object
org.opencastproject.util.data.functions.Strings
Functions for strings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionConvert a string into a boolean.Convert a string into a long if possible.Convert a string into an integer if possible.Trim a string and return eithersomeornoneif it's empty. -
Method Summary
Modifier and TypeMethodDescriptionasString()Returna.toString()wrapped in a some ifa !Returna.toString()wrapped in a some ifa !Returna.toString()or<null>if argument is null.Create a split function from a regex pattern.trimToNone(String a) Trim a string and return eithersomeornoneif it's empty.
-
Field Details
-
trimToNone
Trim a string and return eithersomeornoneif it's empty. The string may be null. -
toDouble
Convert a string into a long if possible. -
toInt
Convert a string into an integer if possible. -
toBool
Convert a string into a boolean.- See Also:
-
trimToNil
-
-
Method Details
-
trimToNone
Trim a string and return eithersomeornoneif it's empty. The string may be null. -
asString
Returna.toString()wrapped in a some ifa != null, none otherwise. -
asString
Returna.toString()wrapped in a some ifa != null, none otherwise. -
asStringNull
Returna.toString()or<null>if argument is null. -
format
-
split
Create a split function from a regex pattern.
-