You can perform string-related operations within an expression using the following library.
String | Description | Input | Output |
---|---|---|---|
boolean isNotEmpty(String <input>) where
|
Returns true if the input string is not empty
( |
|
|
boolean isNotBlank(String <input>) where
|
Returns true if the input string is not empty
( |
|
|
String upperCase(String <input>) where
|
Converts all characters to uppercase. Returns all characters in upper case if input is not null. Returns null if input is null. |
#string.upperCase('john') |
JOHN |
String lowerCase(String <input>) where
|
Converts all characters to lowercase. Returns all characters in lower case if input is not null. Returns null if input is null. |
#string.lowerCase('LOWER') |
lower |
String trim(String <input>) where
|
Removes white space from the start and end of |
#string.trim(' No Padding ') |
No Padding |
String substring(String <input>, int
<start>, int
<end>) where:
|
Gets a substring from the input string starting from the start position and up until the end position, not including the end position. You can use a negative value to start or end n characters from the end of the string. All position counting is zero-based. If start is not to the left of end, "" is returned. Returns null if input is null. |
|
|
boolean startsWith(String <input>, String
<prefix>) where:
|
Checks if the input string starts with the specified prefix and the comparison is case sensitive. Returns true if the input string starts with the prefix with the same case or if both are null. |
#string.startsWith('InputData', 'In') |
true |
boolean endsWith(String <input>, String
<suffix>) where:
|
Checks if the input string ends with the specified suffix and the comparison is case sensitive. Returns true if input string ends with the suffix with the same case or if both are null. |
#string.endsWith('InputData', 'Data') |
true |
String[] split(String <input>, String
<separators>) where:
|
Splits the provided text into an array based on the specified separators. Returned array won't contain any separators. A null separator splits on white space. Returns null if input is null. |
#string.split('Administrator, User, Guest', ',
') |
["Administrator", "User", "Guest"] |
String join(Array <values>, String
<separator>) where:
|
Joins the elements of the provided array into a single string containing the provided elements separated by the provided separator. Returns the joined string or null if the array is null. |
#string.join({'Administrator', 'User', 'Guest'}, ',
') |
Administrator, User, Guest |
int indexOf(String <input>, String
<searchStr>, int
<fromIndex>) where:
|
Finds the first index of the search string within the input string. A negative start
position is treated as zero, and a start position greater than
the input string length only matches an empty search. An empty
search string ( |
#string.indexOf('To find and return index or return -1',
'return', -1) |
12 |
int lastIndexOf(String <input>, String
<searchStr>, int
<fromIndex>) where:
|
Finds the last index within the input string. Search starts from the start position and continues backwards. A negative start position is treated as zero, and a start position greater than the input string length searches the entire string backwards. Returns -1 if a match is not found. |
#string.lastIndexOf('To find and return index or return
-1', 'return', 50) |
28 |
int length(String <input>) where
|
Returns the length of the input string or 0 if input is null. |
#string.length('Input') |
5 |
String replace(String <input>, String
<searchStr>, String
<replacement>, int
<max>) where:
|
Replaces all occurrences of
|
#string.replace('input values replaced by input
replacement', 'in', 'out', -1) |
output values replaced by output
replacement |
int compare(String <str1>, String
<str2>, boolean
<ignoreCase>) where:
|
Compares two strings lexicographically. Returns 0
if |
#string.compare('Input', 'INPUT', true) |
0 |
Number asInt(String <input>, Number
<defaultIfNullOrInvalid>) where:
|
Parses the string argument as a signed decimal integer (min
The characters in the string must all be decimal digits, except
that the first character can be an ASCII minus sign
( |
|
|
Number asLong(String <input>,
Number
<defaultIfNullOrInvalid>) where:
|
Parses the string argument as a signed decimal long (min
The characters in the string must all be decimal digits, except
that the first character can be an ASCII minus sign
( |
|
|
Number asBigInt(String <input>,
Number
<defaultIfNullOrInvalid>) where:
|
Translates the decimal string representation of a BigInteger into a BigInteger. The string representation consists of an optional minus sign followed by a sequence of one or more decimal digits. The character-to-digit mapping is provided by Character.digit. If input is null or not a valid Big Integer, defaultIfNullOrInvalid is returned. |
|
|
Number asFloat(String <input>,
Number
<defaultIfNullOrInvalid>) where:
|
Parses the string argument as a signed decimal float. If input is null, not a valid Float, or Infinity, defaultIfNullOrInvalid is returned. |
|
|
Number asDouble(String <input>,
Number
<defaultIfNullOrInvalid>) where:
|
Parses the string argument as a signed decimal double. If input is null, not a valid number within the range of Double, or Infinity, defaultIfNullOrInvalid is returned. |
|
|
Number asBigDecimal(String <input>,
Number
<defaultIfNullOrInvalid>) where:
|
Translates the string representation of a BigDecimal into a BigDecimal. The string representation consists of an optional sign,
( The value of the exponent must lie between
|
|
|
String asBase64Encoded(String
<input>) where <input> is the string to be encoded. |
Encodes the input string into a new string using the Base64 encoding scheme. Returns the encoded string if input is not empty, or else input is returned as-is. |
#string.asBase64Encoded('Test Value for
encoding') |
VGVzdCBWYWx1ZSBmb3IgZW5jb2Rpbmc= |
String asBase64Decoded(String
<input>) where <input> is the Base64 encoded string to be decoded. |
Decodes a Base64 encoded string into a new string using the Base64 encoding scheme. Returns the encoded string if input is not empty, or else input is returned as-is. This will return null if the input string is not in the valid Base64 schema. |
#string.asBase64Decoded('VGVzdCBWYWx1ZSBmb3IgZW5jb2Rpbmc=') |
Test Value for encoding |
String asUrlEncoded(String
<input>) where <input> is the string to be encoded. |
Translates a string into application/x-www-form-urlencoded format using UTF-8 encoding scheme. Returns the encoded string if input is not empty, or else input is returned as-is. |
#string.asUrlEncoded('username=johndoe+admin') |
username%3Djohndoe%2Badmin |
String asUrlDecoded(String
<input>) where <input> is the URL encoded string to be decoded. |
Decodes an application/x-www-form-urlencoded string using UTF-8 encoding scheme. Returns the decoded string if input is not empty, or else input is returned as it is. Returns null if the input string cannot be decoded due to any illegal characters. |
#string.asUrlDecoded('username%3Djohndoe%2Badmin') |
username=johndoe+admin |
String format(String <format>, String...
<args>) where:
|
Returns a formatted string using the specified format string and arguments. Returns null if a format string contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions. |
|
|
String uuidAsBase64Guid(String
<input>, String
<defaultIfNullOrInvalid>) where:
|
Translates the string representation of a UUID to a GUID in Base64 format. If input is null or not a valid UUID, <defaultIfNullOrInvalid> is returned. |
|
|
String firstNonEmpty(String
<value1>, String...
<value2...10>) where:
|
Returns the first value in the input values which is not empty ('') or null. If all input values are null or empty, then null is returned. There must be at least one input value and the rest are optional. You can enter a maximum of 10 input values. |
|
|
String firstNonBlank(String
<value1>, String...
<value2...10>) where:
|
Returns the first value in the input values which is not empty (''), null or whitespace only. If all input values are null, empty or blank then null is returned. There must be at least one input value and the rest are optional. You can enter a maximum of 10 input values. |
|
|