Read Me - Common Public License V1.0 - Copyright Notice(©)

hasIndex


             +-,-----+
             V       |
>>-hasIndex(---index-+-)---------------------------------------><

Returns 1 (true) if the array contains an item associated with the specified index or indexes. Returns 0 (false) otherwise.

Note that the index argument may also be specified as an array of indexes.

Array class - hasIndex method

a = .array~of("Mike", "Rick", "Fred", "Rick")
say a~hasIndex(2)  -- says: 1
say a~hasIndex(5)  -- says: 0

Read Me - Common Public License V1.0 - Copyright Notice(©)