String handling APIs.
function coalesce(value1 as string, value2 as string) as string
Returns the first non-null value. value2 cannot be null.
Since 1.5.1
function contains(target as string, search as string) as bool
Returns true if the target string contains the specified search string.
function endsWith(target as string, search as string) as bool
Returns true if the target string ends with the specified search string.
function fromDateTime(value as datetime) as string
Converts a datetime value to a string.
function fromDecimal(value as decimal) as string
Converts a decimal value to a string.
function indexOf(target as string, search as string) as int
Returns the index of the first occurrence of the search string in the target string. If not found, returns -1.
function isBlank(value as string) as bool
Returns true if the value is null or contains only whitespaces.
Since 1.7.0
function isDateTime(value as string) as bool
Returns true if the given string is a valid datetime representation.
function isDecimal(value as string) as bool
Returns true if the given string is a valid decimal representation.
function isInt(value as string) as bool
Returns true if the given string is a valid integer representation.
function length(target as string) as int
Returns the length of the string.
function replace(target as string, from as string, to as string) as string
Replaces all occurrences of from with to in the target string.
function split(target as string, splitter as string) as list of string
Splits the target string into a list of substrings using the specified splitter string.
function startsWith(target as string, search as string) as bool
Returns true if the target string starts with the specified search string.
function substring(target as string, start as int, end as int) as string
Returns the substring of the target string from the specified start index to end-1.
function toLower(target as string) as string
Converts the target string to lowercase.
function toSentenceCase(target as string) as string
Converts the first character of the target string to uppercase and the rest to lowercase.
function toTitleCase(target as string) as string
Converts the first character of each word in the target string to uppercase.
function toUpper(target as string) as string
Converts the target string to uppercase.
function trim(target as string) as string
The trim method removes whitespace from both ends of a the target.