Skip to the content
Documentation

insert

No ratings yet

Summary

Returns the input string with additional text inserted at a specified position.

Usage

input|insert( offset, sequence )

Parameters

Name Type Description Required
offset integer The position where the sequence should be inserted. Yes.
sequence string The string that should be inserted. Yes.

Returns

A string consisting of the input and the inserted sequence.

Description

This operator inserts a sequence of characters at a specified position of the input string. The resulting string will be returned.

Examples

Example 1
{'My string is simple.'|insert( 3, 'static ' )}

The following output will be produced: "My static string is simple.".

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.