Skip to main content

Get part of text

Return the part of a text from a start position, for a length or up to an end position.

Command in the String toolkit · id ooa.string/substring · 5 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
TextStringYesSource text.
StartNumberNo0Zero-based start position.
LengthNumberNoNumber of characters to take; to the end when empty.
EndNumberNoZero-based end position (not included); used when length is empty.
If out of rangeStringNoerrorWhen the start is past the end of the text: fail with STRING.BAD_POSITION, or return empty text.

Outputs​

OutputTypeWhat it is
resultStringThe selected part of the text.