string.listSetAt()

Replaces the contents of a list element.

string.listSetAt( position=number, value=string, delimiters=string, includeEmptyFields=boolean )

Returns: String

Argument Description
position
number, required

Position at which to set a value. The first list position is 1.

value
string, required

An element or a list of elements to set.

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

fruits = "apple,mango-papaya,lemon,grapes,mango-Apple,Mango-apple,mango";
res = fruits.listsetat("2","potato");
writeDump(res);

See also