[Overview][Resource strings][Constants][Types][Procedures and functions][Index] | Reference for unit 'StrUtils' (#rtl)

# IndexText

Index of text in a list of values

## Declaration

Source position: strutils.pp line 42

`function IndexText(`
`const AText: string;`
`const AValues: array of string`
`):Integer; function IndexText(`
`const AText: UnicodeString;`
`const AValues: array of UnicodeString`
`):Integer;`

## Description

IndexText returns the index of the string in the array aValues that matches aText, and -1 otherwise. The comparison is done case insensitively. If you wish to compare case sensitively, use IndexStr instead.

## See also

IndexStr |  | Searches, observing case, for a string in an array of strings.
MatchText |  | Check if a string is in a list of values
AnsiIndexText |  | Searches, case insensitive, for a string in an array of strings.