🎉 Tickety V3 has now been released! Read more →
PlaceholdersParsers

Slice Parser for Placeholders

Return part of a piece of text in a Tickety placeholder, from a start position up to an end, with every supported parameter format, aliases and examples.

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.

On this page