ListInsertAt
Filters a delimted list and returns the values from the callback test
Method Signature
ListInsertAt(list=[string], position=[integer], value=[string], delimiter=[string], includeEmptyFields=[boolean], multiCharacterDelimiter=[boolean])
Arguments
Argument
Type
Required
Description
Default
list
string
true
string list to filter entries from
position
integer
true
value
string
true
delimiter
string
false
string the list delimiter
,
includeEmptyFields
boolean
false
boolean whether to include empty fields in the returned result
false
multiCharacterDelimiter
boolean
false
boolean whether the delimiter is multi-character
true
Examples
Simple Example
Inserts 'foo' into the list at position 2
listInsertAt( "bar,lorem,ipsum", 2, "foo" );
Result: bar,foo,lorem,ipsum
Example with Custom Delimiter
Inserts 'foo' into the list with a custom delimiter
listInsertAt( "bar|lorem,ipsum|me|something", 2, "foo", "|" );
Result: bar|foo|lorem,ipsum|me|something
Additional Examples
writeOutput( listInsertAt( "a,,b,c,", 1, "one" ) );
// Member Function with @ delimiter
strList = "a@b@d";
writeDump( strList.listInsertAt( 3, "c", "@" ) );
Related
Last updated
Was this helpful?