This version is out of date, covering development from v6.0.0 to v6.6.5. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

TinderboxSix Icon

List/Set.at(N)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 Baseline

 


List.at(N)

This returns the Nth value of the List as a string. List can be either Set or List type attributes (or string literal, regex pattern, or expression equivalents thereof).

The operator is zero-based, i.e. an N value of 0 returns the first list item, an N of 1 returns value #2, etc. If the value of N exceeds the number of items in the list an empty string (blank value) is returned. A negative number returns an item numbering in reverse - but one-based not zero-based - so '-1' returns the last item on the list, '-2' the last but one item, etc..

Examples (where $MyList is "ant;bee;cow"):

$MyString = $MyList.at(0) returns "ant"

$MyString = "XX;YY;ZZ".at(2) returns "ZZ"

$MyString = $MyList.at(5) returns "" (nothing) 

$MyString = $MyList.at(-2) returns "bee"



A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : List/Set.at(N)