RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
THashedStringList.IndexOfName Method

Returns the position of the first string with the form Name=Value with the specified name part.

Pascal
function IndexOfName(const Name: string): Integer; override;
C++
virtual __fastcall int IndexOfName(const AnsiString Name);

Call IndexOfName to locate the first occurrence of a string with the form Name=Value where the name part is equal to the Name parameter or differs only in case. IndexOfName returns the 0-based index of the string. If no string in the list has the indicated name, IndexOfName returns -1. 

The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.

Note: If there is more than one string with a name portion matching the Name parameter, IndexOfName returns the position of the first such string.
 

 

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