Web.HTTPApp.ExtractHeaderFields
Delphi
procedure ExtractHeaderFields(Separators, _WhiteSpace: TExtractCharSet; const Content: string; Strings: TStrings; Decode: Boolean; StripQuotes: Boolean = False);
procedure ExtractHeaderFields(Separators, _WhiteSpace: TExtractCharSet; Content: PChar; Strings: TStrings; Decode: Boolean; StripQuotes: Boolean = False);
C++
extern DELPHI_PACKAGE void __fastcall ExtractHeaderFields(const TExtractCharSet &Separators, const TExtractCharSet &_WhiteSpace, const System::UnicodeString Content, System::Classes::TStrings* Strings, bool Decode, bool StripQuotes = false)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | Web.HTTPApp.pas Web.HTTPApp.hpp |
Web.HTTPApp | Web.HTTPApp |
説明
複数の値からなる文字列を各構成要素に分解します。
ExtractHeaderFields プロシージャは,多値 HTTP ヘッダー文字列を別々の部分文字列に分解する一般的なユーティリティです。
Separators パラメータは,複数の値からなる文字列の個々の値を分離するために使用する文字の集合です。
WhiteSpace パラメータは,文字列を分解するときに無視される文字の集合です。
Content パラメータは,分解の対象となる,複数の値からなる文字列です。
Strings パラメータは,Content パラメータから分解された個々の値が入る TStrings オブジェクトです。
StripQuotes は,結果の文字列から前後の引用符が削除されるかどうかを指定します。StripQuotes が true ならば,前後の引用符を削除してから部分文字列が Strings に追加されます。
メモ: Separators または WhiteSpace の文字は,部分文字列が単引用符または二重引用符に囲まれている場合に値部分文字列の一部として処理されます。HTTP エスケープ文字は,HTTPDecode 関数を使って変換されます。