RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWideStrings.IndexOfIgnoreCase Method

Returns the position of a string (or one that differs only in case) in the list.

Pascal
function IndexOfIgnoreCase(const S: WideString): Integer;
C++
__fastcall int IndexOfIgnoreCase(const BSTR S);

Call IndexOfIgnoreCase to obtain the position of the first occurrence of the string S, or of a string that differs from S only by case. IndexOfIgnoreCase returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOfIgnoreCase returns 0, if S is the second string, IndexOfIgnoreCase returns 1, and so on. If the string is not in the string list, IndexOfIgnoreCase returns -1. 

IndexOfIgnoreCase uses a case-insensitive search. To locate a string case-sensitively, use the IndexOf method instead.

Note: If the string appears in the list more than once, IndexOfIgnoreCase returns the position of the first occurrence.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!