Internet Direct (Indy) Version 9.0.2 Beta
TIdHeaderList.IndexOfName
Returns the index position of the header with the given name.

function IndexOfName(const Name: string): Integer;
Parameters
const Name: string
Header name to locate.

Returns
Integer - Index position, or -1 when not found.

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

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