ListInsertAt()

Inserts an element in a list.

ListInsertAt( list=string, position=number, value=string, delimiters=string, includeEmptyFields=boolean );

Returns: String

Argument Description Default
list
string, required

a string list

position
number, required

Position at which to insert element. The first list position is 1.

value
string, required

An element or a list of elements.

delimiters
string, optional

Characters that separate list elements. The default value is comma.

Alias: delimiter

,

includeEmptyFields
boolean, optional

if set to true, empty values are included as well

Examples

writeOutput(listInsertAt("a,,b,c,",1,"one"));

//Member Function with @ delimiter strList="a@b@d"; writeDump(strList.listInsertAt(3,"c","@"));

See also