text →
replace-slice(
    start: integer,
    length: integer,
    append: text
) → text

Returns the argument value with a subset of the string substitued by a another string.

Parameters

Name Type Required Description
start integer Yes The position to start to replace
length integer Yes The length to replace
append text Yes The text to append when the slice has been removed

Argument evaluation

  • start: Evaluated once in the enclosing context.
  • length: Evaluated once in the enclosing context.
  • append: Evaluated once in the enclosing context.

Examples

"Hello World" | replace-slice(1, 2, "X")  "HXlo World"

Kind: Function
Scope: text/concatenation
Aliases: text-to-replace-slice


This site uses Just the Docs, a documentation theme for Jekyll.