String Manipulation

Split, join, replace, and format strings.

What it does

String Manipulation covers everyday text work: replace, join, split, trim, case-change, search and repeat. Pick an Operation and only the parameters that operation needs are shown.

The node has four outputs, a string, a number, a boolean and a list, and only the one matching the chosen operation carries a value. Wire from Result for text, Number for Length and Index Of, Boolean for Contains, List Result for Split.

When to use it

ParameterTypeDefault
stringOneOf([String])
operationString"Length"
findString""
replaceString""
find_listOneOf([Collection])
replace_listOneOf([Collection])
otherOneOf([String])
indexNumber0
startNumber0
endNumber-1
delimiterString","
listOneOf([Collection])
searchString""
countNumber2

Gotchas

Join reads the List input, not the string input at the top of the node. Wire the strings to glue together into List; Split's List Result goes straight there. With nothing wired to List, Join gives an empty string, since there is nothing to join.

In Substring, End at -1 means to the end of the string. Any other value is treated as an exclusive end index.

Repeat is capped at 100 copies internally, so a very large Count yields 100 repeats.

Only one output pin is filled per operation. Length and Index Of write to Number, Contains writes to Boolean, Split writes to List Result, and every other operation writes to Result. Wiring the wrong pin for the chosen operation gives an empty value, not an error.

Replace All expects Find List and Replace List to be the same length and in matching order. Each entry in Find List is swapped for the entry at the same position in Replace List, in a single left-to-right pass over the string. Mismatched list lengths leave extra find or replace entries unused.

Worked example

  1. Add a String Manipulation node and feed it a string, e.g. "/assets/textures/wood.png".

  2. Set Operation to Split and Delimiter to /, then wire List Result onward to work with each path segment.

  3. Add a second String Manipulation node, set Operation to Replace, Find to .png, Replace to .jpg, to swap the file extension on the original string.

  4. To glue the segments back up, add a third String Manipulation node, set Operation to Join and Delimiter to /, and wire the first node's List Result into its List input.

See also

String Generator · List Operations · Value · Numbers, signals & audio