[archived content]

ListBox.findStringExact method

public int findStringExact(char[] str, int startIndex)
public int findStringExact(char[] str)

Case insensitively finds the string str in the list and returns the item index, or returns -1 if not found. startIndex is the index to start from and the search wraps back around to the top; if omitted or -1, the entire list is searched from the top.

This is different from items.indexOf because findStringExact compares all added Objects' toString as opposed to just comparing added string types.

To find just the beginning of a string and not an entire string, use findString.

Page last modified on May 07, 2007, at 11:25 AM