RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.IndexText Function

IndexText determines if any of the strings in the array AValues match the string specified by AText using a case insensitive comparison. It returns the zero-based index of the first match in the array, or -1 if no match is found.

Pascal
function IndexText(const AText: string; const AValues: array of string): Integer; overload;
C++
int IndexText(const AnsiString AText, const array of string AValues);

For a case sensitive comparison, use the IndexStr routine. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!