Topic Path: Symbol Reference > Functions > ExtractHeaderSubItem Function
ContentsIndexHome
PreviousUpNext
ExtractHeaderSubItem Function

Extracts an attribute value from a message header.

File
function ExtractHeaderSubItem(
    const AHeaderLine: String; 
    const ASubItem: String
): String;
Parameters 
Description 
AHeaderLine 
Message header value containing data to be extracted.
 
ASubItem 
Header attribute to be extracted from the message header. 

String - Content for the header attribute.

ExtractHeaderSubItem is a String function used to extract the header attribute indicted in ASubItem from the RFC message specified in AHeaderLine. 

AHeaderLine contains the value for the RFC message header after the header name and ':' delimiter have been removed. 

ASubItem contains the attribute name including the '=' character (when required). 

The return value is the contents of the header attribute without leading and trailing '"' delimiters up to a ';' in the message header data.

(Delphi) Extracting an attribute value from a message header. 

 

Result := ExtractHeaderSubItem(AMsg.ContentType, 'CHARSET=');
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.