PosInListLeft

Prev Next Home Home Table Of Contents Index

PosInListLeft (String,Array) : Number

PosInListLeft is similar to the PosInList command. It searches a string array for a matching string and returns the line number of the first match. Unlike PosInList which compares the whole string, PosInListLeft will find the first string that starts with the search string.

The difference between PosInListPartial and PosInListLeft is that PosInListPartial will match anywhere in the string, and PosInListLeft will match only if the string starts with the search string.


Example:
var List List[1] = 'Date=09-20-93' List[2] = 'Time=10:18' List[3] = 'Name=Marc' Writeln PosInListLeft('Name=',List) ; returns 3

You can also pass two numbers to PosInListLeft which define the start and end positions in the list to search.


Example:
Writeln PosInListLeft('Name=",List,2,3) ;returns 3

See Also: PosInList PosInListPartial PosInSortedList

Category: String Array

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home