String Functions

The Calculator component provides a set of string functions that can be imported from the library.

The Calculator component supports the following string functions:

concat(s1, s2,...)

Joins two or more strings together. Takes two or more strings as arguments and returns a string.

strlen(s)

The length of a string. Takes a string as an argument and returns an integer.

index(s1, s2)

Searches for a string inside another string and returns the starting location. Takes two strings as arguments and returns an integer.

upcase(s)

Converts a string to upper case. Takes a string as an argument and returns a string.

downcase(s)

Converts a string to lower case. Takes a string as an argument and returns a string.

substr(s, start, end)

Substring, using java.lang.String rules. Takes a string and two integers as arguments and returns a string.

join(s_array, delim)

Joins a string array, separating values with a string delimiter. Takes a string array and a string as arguments and returns a string.

split(s, delim)

Splits a string at delimiters. Takes two strings as arguments and returns a string array.