substring
This block is part of the value group and was last modified in core v10.4.28.
substring v10.4.28 In pins 3
- value required
value - index
number - length required
number
Out pins 1
- Output
value
Extracts number_1 characters starting at index number_0, counting Unicode code points. A falsy input (nil, "", or the number 0) emits NO output at all (the out-pin stays unset). A NEGATIVE start is clamped to 0 -- it does NOT count from the end like JS substr; a start past the end outputs "", and a missing or non-numeric length takes the rest of the string. Non-string input is coerced to its JS string form first.
substr |
A typical wiring for substring: number feeds the number_0 pin; random between feeds the value pin; the value out pin feeds concatenate values.

Commonly used with
In production blueprints, this block is most often wired together with:
- number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
- concatenate values: this block feeds into it.
- set fields: this block feeds into it. Generates an array of mutations based on the given filled fields.
- random between: feeds into this block. Generates a random number between, including, the given two numbers. This number will be an integer (e.g. 1, 2, 3) without decimals.
- value: feeds into this block. Simply returns the provided value.
- get fields: feeds into this block. Gets the selected fields from the given object.
Version history
Introduced in v10.4.28.
Back to
value Return to the main group to view all sub-groups Back to utils Return to the group to view all blocks within this group
