ListGetEndings
Returns the first or last item in a delimited list, according to the specified function name
Method Signature
ListGetEndings(list=[string], delimiter=[string], includeEmptyFields=[boolean], multiCharacterDelimiter=[boolean])
Arguments
Argument
Type
Required
Description
Default
list
string
true
string list to filter entries from
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
false
Examples
Simple listLast Example
A very basic listLast example
listLast( "one,two,three,four" );
Result: four
listLast Example with multiple delimiters
A more advanced listLast example
listLast( "one/two\three/four", "\/" );
Result: four
Additional Examples
// Simple Example
writeoutput( listLast( "Susi ,LAS,,boxlang,,,test" ) );
// Member Function
strList = ",I,,love,boxlang,,";
writeDump( strList.listLast() );
Related
Last updated
Was this helpful?