String Subset
- Updated2023-02-17
- 2 minute(s) read
String Subset
Returns a portion, or substring, of a string.

Inputs/Outputs

string
The string from which you want to obtain a subset.

offset
The number of characters into the input string at which this node begins its operation.
The offset of the first character in the input string is 0. If offset is beyond the end of the input string, this node returns an empty string.
Default value: 0

length
The number of characters you want to include in the substring.
If length is negative or 0, this node returns an empty string.
Default value: The entire length of string minus offset.

substring
The portion of the input string that is the specified length beginning at the offset.
Reducing Performance Burden
Characters in UTF-8 can be multiple bytes so string nodes count the number of characters in a string instead of jumping to a point in memory. Since the length and offset parameters are in units of characters, avoid nesting this node with large strings because that can create exponential functions that carry a higher performance burden.