listGetAt

Gets a list element at a specified position.

listGetAt(list, position [, delimiters]) → returns String

Argument Reference for the listGetAt function

list

Required: Yes

position

Required: Yes

delimiters

Required: No
Default: ,
Values:
  • ,
  • |
  • ;
  • chr(9)
  • chr(10)
  • chr(13)

Examples sample code invoking the listGetAt function


Simple Example

Returns the 2nd element in the list

listGetAt("foo,bar,lorem,ipsum", 2)

Expected Result: bar


Example with Delimiter

Returns the 3rd element in the list using a custom delimiter

listGetAt("foo,bar|lorem,ipsum|me|something", 3, "|")

Expected Result: me


Fork me on GitHub