ez.no / exponential / documentation / reference / template operators / strings / insert
$input_string|insert( offset, sequence )
| Name | Type | Description | Required |
|---|---|---|---|
| offset | integer | Position of insertion. | yes |
| sequence | string | String to insert. | yes |
input string including inserted values.
This operator inserts a sequence of characters at a specified position in a string. Returns the original string with the inserted values. There is also an array-version of this operator. Look in the arrays category.
{"my string is simple"|insert( 3, "static " )}
returns the string "my static string is simple".
Comments