RAD Studio VCL Reference
AnsiStrings.AnsiIndexStr Function

Look for string in string array with case-sensitivity.

function AnsiIndexStr(const AText: AnsiString; const AValues: array of AnsiString): Integer; overload;
int AnsiIndexStr(const AnsiString AText, const array of AnsiString AValues);

AnsiIndexStr returns the index of a matching string in an array of strings. If the string is not found, the function returns -1. 

The string comparison is made with case-sensitivity and is controlled by the current user locale, as for AnsiSameStr

Use AnsiIndexText to search strings without case-sensitivity. 


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