btrim()
Removes characters from both ends of a given string until encountering a character that is not contained 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 |
char_length()
Returns the number of characters in a string.
character_length()
is a synonym tochar_length()
.
Syntax | char_length(<str>) |
||
Arguments | Name | Type | Description |
<str> |
Textual | The input string | |
Return Type | UINT |
RETURN char_length("Ultipa Graph")
Result:
char_length("Ultipa Graph") |
---|
12 |
left()
Returns a substring of the given string containing the specified number of leftmost characters.
Syntax | left(<str>, <length>) |
||
Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
<length> |
UINT |
Length of the substring | |
Return Type | STRING |
RETURN left("Ultipa Graph", 6)
Result:
left("Ultipa Graph", 6) |
---|
Ultipa |
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 |
normalize()
Converts a string into a consistent format based on the normalization form specified, in accordance with Unicode Standard Annex #15.
This function is typically used to compare two strings by their Unicode codepoints. Two characters appear identical to human eyes may have different codepoints, such as the multiplication sign ×
(U+00D7) and the letter x
(U+0078).
Syntax | normalize(<str>[, <form>]) |
||
Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
<form> |
/ | The normalzation form (NF) keyword:
|
|
Return Type | STRING |
RETURN normalize('×') = normalize('x') AS result
Result:
result |
---|
0 |
right()
Returns a substring of the given string containing the specified number of rightmost characters.
Syntax | right(<str>, <length>) |
||
Arguments | Name | Type | Description |
<str> |
Textual | The original string | |
<length> |
UINT |
Length of the substring | |
Return Type | STRING |
RETURN right("Ultipa Graph", 5)
Result:
right("Ultipa Graph", 5) |
---|
Graph |
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 |
trim()
Removes all the occurrences of the specified single character from either the leftmost, rightmost, or both ends of a given string.
Syntax | trim([[<spec>] [<char>] FROM] <str>) |
|||
Arguments | Name | Type | Description | Note |
<spec> |
/ | The trim specification keyword:
|
If FROM is specified, then at least one of <spec> and <char> shall be specified. |
|
<char> |
STRING |
The character to look for; it defaults to a space | ||
<str> |
Textual | The original string | / | |
Return Type | STRING |
RETURN trim(" Ultipa Graph ") AS newString
Result:
newString |
---|
Ultipa Graph |
RETURN trim(BOTH "a" FROM "aaGraph DBa") AS newString
Result:
newString |
---|
Graph DB |
RETURN trim(LEADING "a" FROM "aaGraph DBa") AS newString
Result:
newString |
---|
Graph DBa |
RETURN trim(TRAILING FROM " Graph DB ") AS newString
Result:
newString |
---|
Graph DB |
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 |