| Block Group: | String Operations |
| Icon: | ![]() |
The Substring block returns a specific substring from a string.
The block checks for parameters in the following order of importance:
For information on using dataflow blocks, see Dataflow.
The following properties of the Substring block can take input and give output.
input specifies the text string that contains the characters to extract.
start determines the position of the first character to extract. A value of 0 indicates the first character in the input. A negative value counts from the end of the input; for example, -3 indicates the third character from the end.
length specifies the number of characters to extract.
end determines the position after the last character to extract. The character at the end position is not included. A negative value counts from the end of the input.
The following property of the Substring block can give output but cannot take input.
output returns the substring.
The following are special cases for the Substring block:
The following image demonstrates two examples of the Substring block. The leftmost Substring block returns a four-character substring that begins with the character at position 0. The rightmost Substring block returns a substring that begins with the character at position 4 and ends with the character at position 9.