String Functions
String Functions
| Function | Description |
|---|---|
| concatenate(str1, str2,…) | Joins several values in one text string. |
| contains(String str, char searchChar) | Checks if String contains a search character, handling null. |
| contains(String str, String searchStr) | Checks if String contains a search String, handling null. |
| containsAny(String str, char[] chars) | Checks if the String contains any character in the given set of characters. |
| containsAny(String str, String searchChars) | Checks if the String contains any character in the given set of characters. |
| endsWith(String str, String suffix) | Check if a String ends with a specified suffix. |
| isEmpty(String str) | Checks if a String is empty (“”) or null. |
| isNotEmpty() | Verifies if a String is non-empty. |
| length(String str) | Returns the number of characters in a string. |
| like(String str, String pattern) | Used to check whether a string value matches the predefined pattern, such as emails, phone numbers, and zip codes. For more information, see Pattern-Matching Function. |
| lowerCase(String str) | Converts a String to lower case. |
| removeEnd(String str, String remove) | Removes a substring only if it is at the end of a source string, otherwise returns the source string. |
| removeStart(String str, String remove) | Removes a substring only if it is at the beginning of a source string, otherwise returns the source string. |
| replace(String str, String searchString, String replacement) |
Replaces all occurrences of a String within another String. |
| replace(String str, String searchString, String replacement, int max) |
Replaces a String with another String inside a larger String, for the first max values of the search String. |
| startsWith(String str, String prefix) | Check if a String starts with a specified prefix. |
| substring(String str, int beginIndex) | Gets a substring from the specified String. A negative start position can be used to start n characters from the end of the String. |
| substring(String str, int beginIndex, int endIndex) | Gets a substring from the specified String. A negative start position can be used to start or end n characters from the end of the String. |
| textJoin (String separator, Object[]) | Combines non-empty values from multiple ranges and strings and includes a separator between each two values combined into single text. Objects can be of any type, such as string, double, integer, and custom type. |
| textSplit (String separator, String text) | Splits the input text into a non-empty valued array of strings using the separator. |
| toBoolean(a) | Converts a string to Boolean. |
| toDouble(String) | Converts a string of numeric characters to the Double. The dot “.” symbol must be used as a decimal separator. |
| toInteger(String) | Converts a string of numeric characters to the Integer value. |
| toString(Number num) | Converts a number into a string with maximum number of 3 digits after the decimal point. Trailing zeroes are omitted. The default format is #.###. |
| toString(Number num, String format) | Converts a number into a string according to the specified format as follows: 0 Used as a digit. # Used as a digit. Meaningless zeroes are omitted, for example, 012.300 -> 12.3. . Used as a decimal separator or monetary decimal separator. - Used as a minus sign. , Separates items in a group. E Separates the mantissa and exponent in a scientific notation. It does not need to be quoted in a prefix or suffix. ; Separates positive and negative subpatterns. % Used to multiply the value by 100 and display it as percentage. ‰ Used to multiply the value by 1000 and display it as a milli-value. ’ Used to quote special characters in a prefix or suffix. Example: “’#’#” formats 123 to “#123”. To create a single quote, use two symbols in a row: “# o’‘clock”. |
| trim(String str) | Removes whitespace characters from both ends of a string. |
| upperCase(String str) | Converts a string to upper case. |