REPLACE

The REPLACE function replaces an input text string with a given value for a specified index and length. Node references are also accepted as arguments. The index starts at 1 i.e. the first character of the input string will have an index of 1.

Syntax

replace(old_string:string, index:number, length:number, replace_text:string)

Arguments

old_string- Required. A text string.

index- Required. A number indicating the position at which the string should be replaced.

length- Required. A number indicating the number of characters to be replaced in the input string.

replace_text- Required. A text string that will replace a part/all of the old_string parameter.

Example

REPLACE('INFORIVER', 1, 4, 'LUMEL')

Returns “LUMELRIVER".

Last updated