Search/Split String
- Updated2023-02-17
- 3 minute(s) read
Search/Split String
Divides a single string into two substrings.
This node searches a string for the string or character in search string/char and splits the string when it finds a match. This node returns two strings: the substring before the match, and the match plus the rest of the original string.
Inputs/Outputs

string
The input string the node searches or splits.

search string/char
The string or character to search for in the input string.
Default value: -

offset
Number of characters into the string at which the node begins searching.

substring before match
Portion of the string before the search string or before the offset if the search string is unwired. If the node does not find the search string, this output returns the entire string.

match and rest of string
The search string and all subsequent characters in the string. If the node does not find the search string, this output returns an empty string.

offset of match
The position of the search string/char in the string. If there is no match, this output returns -1.
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.