Topic Path: Symbol Reference > Classes > TIdHeaderList Class > TIdHeaderList Methods > IndexOfName Method
ContentsIndexHome
PreviousUpNext
TIdHeaderList.IndexOfName Method

Index position in the list for the header with the specified name.

function IndexOfName(
    const AName: string
): Integer; reintroduce;
Parameters 
Description 
AName 
Header name to locate in the list. 

Integer - Position of the named header in the list, or -1 when not found.

IndexOfName is an Integer function that returns the index position of the header with the name indicated in AName in the header list. IndexOfName work like Borland's TStrings.IndexOfName, but uses the delimiters defined in NameValueSeparator, and respects the case sensitivity flag in the CaseSensitive property. 

IndexOfName ignores header Values when locating the index position. 

IndexOfName can return -1 when the header in Name does not exist in the header list.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.