method IndexOf(Text: String): Number
Available for StringList Objects. Returns the Index of the first item in the list with a value of Text.
IndexOf method syntax has these named arguments:
Parameter |
Description |
|---|---|
Text |
Required. The text to return the index number of in the list. |
For example:
dim sl as object
sl = createobject("Accredo.StringList")
sl.add("text")
sl.add("other")
sl.add("text")
print (sl.indexof("text"))
print (sl.indexof("TEXT"))
both print statements will return 0, as this is the index of first instance of "text" in the list.