Attributes | Name and Description |
---|---|
|
caplin.core.StringUtility()
This is a static class that never needs to be instantiated. |
Attributes | Name and Description |
---|---|
<static>
|
String
buildString(Object source, String separator, boolean includeName)
Concatenates the string fields of an object into a single string, each field being separated from the next by 'separator'. |
<static>
|
Boolean
isNullUndefinedOrEmpty(String source, Boolean trim)
Determines if the string is |
<static>
|
Array
splitAndTrim(String source, String separator)
Splits up the specified input string, based on the specified separator, and {@link #trim trims} each of the output strings. |
►
caplin.core.StringUtility()
This is a static class that never needs to be instantiated.
►
<static>
String
buildString(Object source, String separator, boolean includeName)
Concatenates the string fields of an object into a single string, each field being separated from the next by 'separator'. If includeName is set to true, then the field name will also be included in the string.
Object | source | The object whose fields will be concatenated into a single string. |
String | separator | The string to use as the separator between each field in the returned string. |
boolean | includeName | If true, the names of the object's fields will be included in the returned string. |
►
<static>
Boolean
isNullUndefinedOrEmpty(String source, Boolean trim)
Determines if the string is null
, undefined
or an empty string.
String | source | The string to be tested |
Boolean | trim | (Optional) Defaults to false . If true
any whitespace will be trimmed before performing the empty string comparison. |
►
<static>
Array
splitAndTrim(String source, String separator)
Splits up the specified input string, based on the specified separator, and {@link #trim trims}
each of the output strings. For example, the string "one, two, three"
split with a
comma separator will produce an array output of ["one","two","three"]
.
String | source | The string to be split up. |
String | separator | The separator which will be used to split the string up. |