This function returns a specific part of a text by using a start index (first element) and end index (last element).
syntax
substring(text, startIndex, endIndex) #Output: Text
Use cases and examples
Use case |
---|
No content found. |
This function returns a specific part of a text by using a start index (first element) and end index (last element).
substring(text, startIndex, endIndex) #Output: Text
Take this text as an example:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
H | A | M | B | U | R | G | E | R | S | A | R | E | D | E | L | I | C | I | O | U | S |
Parser expression | Description |
---|---|
%{substring("HAMBURGERS ARE DELICIOUS", 11, 14)} | This example returns: ARE |
%{substring("HAMBURGERS ARE DELICIOUS", 15, 24)} | This example returns: DELICIOUS |
Parameters used in this function
Parameter | Input (data type) | Description |
---|---|---|
text | TEXT | Any given text. |
startIndex | NUMBER | A number that specifies the index of the first character for the substring. The index starts at 0. In case startIndex is less than 0, an error is returned. |
endIndex | NUMBER | A number that specifies the index-1 of the last character for the substring. The length of the substring is endIndex - startIndex. In case endIndex is higher than length(text)-1, an error is returned. In case endIndex - startIndex is less than 0, an error is returned. |
This function returns a TEXT
Use case |
---|
No content found. |
Powered by Atlassian Confluence 8.5.12, themed by Refined 7.6.0 and Decadis AG