string requiredThe input text to take characters from. Counts characters in a UTF-8 aware way (a multi-byte character is one position, not several bytes).
start required default 0The position to start at, counting from 0 (so 0 is the first character). A negative value counts back from the end: -3 starts three characters before the end.
length optional default 999999999 (the whole remainder)How many characters to take. If omitted, the rest of the string from start is returned. A negative length keeps everything except that many characters cut off the end.
add optional default (empty)A string appended to the result, but only when the result is actually shorter than the input. Set it to ... to get an ellipsis on truncated text; leave it empty for a plain cut.
{substr:Hello World:0:5}
{substr:Hello World:6}
{substr:The quick brown fox:0:9:...}
{substr:Hello:0:50:...}
{substr:report.pdf:-3}
{substr:report.pdf:0:-4}