Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

insert

Summary

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

Usage

input|insert( offset, sequence )

Parameters

NameTypeDescriptionRequired
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.".

Balazs Halasy (05/02/2004 10:57 am)

Balazs Halasy (04/05/2005 2:42 pm)


Comments

There are no comments.