substring-n

nkrkv/text/substring-n

Extracts an inner part of a string from `STRT` char, up to `N` chars in length
substring-n
@/substring-n
Extracts an inner part of a string from `STRT` char, up to `N` chars in length
INstring
Input string
STRTnumber
Start character index. Zero-based. Fractional indexes are truncated to integers, negative values are interpreted as zero. Indexes past the string length lead to an empty result.
Nnumber
Number of characters to extract. Fractions are truncated. Negative values are interpreted as zero. If `N` is too large for the given input, `OUT` will have a length less than `N`.
substring-n
OUT
IN
STRT
N
OUTstring
Resulting substring (aka part, slice). Will be empty if `N` ≤ `0` or `STRT` is past the input length.
To use the node in your project you should have the nkrkv/text library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.