position Method

Class: List

Description

This method returns the leftmost position at which the string occurs in the list.

Syntax

ListObject.position(String element,String delimiter,

Boolean ignoreCase)

Parameters

element

The string to locate in the list.

delimiter

A character that is used to delimit the values in the list.

ignoreCase

An option that indicates whether to ignore case when searching for the string in the list.

Returns

A Number.

When Became Available

Profile v7.0

Example

// define a List object with some elements

type List myList = Class.new("List", "AAP:NOOT:MIES")

 

//

write myList.position("Noot",":",1) // writes "2"