btrim()
Removes characters from both ends of a given string until encountering a character not included in the specified set of characters.
| Syntax | btrim(<str>[, <chars>]) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
<chars> |
STRING |
The set of characters to look for; it defaults to a space | |
| Return Type | STRING |
||
return btrim(" Ultipa Graph ") AS newString
Result:
| newString |
|---|
Ultipa Graph |
return btrim("123ABC341", "123") AS newString
Result:
| newString |
|---|
| ABC34 |
endsWith()
Checks whether a string ends with a specified substring, returning 1 for true and 0 for false.
| Syntax | endsWith(<str>, <subStr>) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The input string | |
<subStr> |
STRING |
The substring to look for | |
| Return Type | STRING |
||
return endsWith("ultipa.com", "com")
Result:
| endsWith("ultipa.com", "com") |
|---|
| 1 |
length()
Returns the number of characters in a string.
| Syntax | length(<str>) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The input string | |
| Return Type | UINT |
||
return length("Ultipa Graph")
Result:
| length("Ultipa Graph") |
|---|
| 12 |
lower()
Converts all the characters in a given string to lowercase.
| Syntax | lower(<str>) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
| Return Type | STRING |
||
return lower("Ultipa Graph")
Result:
| lower("Ultipa Graph") |
|---|
| ultipa graph |
ltrim()
Removes characters from the begining of a given string until encountering a character that is not contained in the specified set of characters.
| Syntax | ltrim(<str>[, <chars>]) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
<chars> |
STRING |
The set of characters to look for; it defaults to a space | |
| Return Type | STRING |
||
return ltrim(" Ultipa Graph ") AS newString
Result:
| newString |
|---|
Ultipa Graph |
return ltrim("124ABC341", "123") AS newString
Result:
| newString |
|---|
| 4ABC341 |
rtrim()
Removes characters from the end of a given string until encountering a character that is not contained in the specified set of characters.
| Syntax | rtrim(<str>[, <chars>]) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
<chars> |
STRING |
The set of characters to look for; it defaults to a space | |
| Return Type | STRING |
||
return rtrim(" Ultipa Graph ") AS newString
Result:
| newString |
|---|
Ultipa Graph |
return rtrim("123ABC4321", "123") AS newString
Result:
| newString |
|---|
| 123ABC4 |
split()
Splits a string into a list of substrings using the specified delimiter.
| Syntax | split(<str>, <delimiter>) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The input string | |
<delimiter> |
STRING |
The delimiter | |
| Return Type | LIST |
||
return split("apple, pumpkin, lemon tart", ", ") as strList
Result:
| strList |
|---|
| ["apple","pumpkin","lemon tart"] |
startsWith()
Checks whether a string begins with a specified substring and returns 1 for true or 0 for false.
| Syntax | startsWith(<str>, <subStr>) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The input string | |
<subStr> |
STRING |
The substring to look for | |
| Return Type | STRING |
||
return startsWith("ultipa.com", "ultipa")
Result:
| startsWith("ultipa.com", "ultipa") |
|---|
| 1 |
upper()
Converts all the characters in a given string to uppercase.
| Syntax | upper(<str>) |
||
| Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
| Return Type | STRING |
||
return upper("Ultipa Graph")
Result:
| upper("Ultipa Graph") |
|---|
| ULTIPA GRAPH |