PlaceholdersParsers
Slice Parser
The Slice Parser returns a substring of the given text. It supports multiple parameter formats for convenience.
Aliases
slice,substr,substring
Usage
{slice(start):text} — returns substring from start to the end
{slice(start,end):text} — returns substring from start up to (but not including) end
{slice(start-end):text} — alternate syntax using a hyphen between indices
Examples
- Input:
{slice(3): Hello World}→lo World - Input:
{slice(3,7): Hello World}→lo W - Input:
{slice(3-7): Hello World}→lo W
Notes
- Indices follow typical string-slice semantics (0-based). Negative indices behavior depends on the runtime; prefer positive indices for predictable results.
- Use this parser to extract portions of text or variables.