Inserts a substring in a string after a specified character
position. If position = 0, prefixes the substring to the

insert(substring, String, position) → returns String

Argument Reference for the insert function


Required: Yes
A string to insert


Required: Yes
A string, which to insert substring


Required: Yes
Substring add after this postion value in given string

Examples sample code invoking the insert function

Simple insert function example

To add substring on prefix of the given string

someString = ' chrome browser';
result = insert('Google', someString, 0);

Expected Result: Google chrome browser

Simple insert function example with position

To add substring on suffix of the given string

someString = 'New private mozilla fire';
length = len(someString);
writeOutput(insert('fox', someString, length));

Expected Result: New private mozilla firefox

Fork me on GitHub