System.Classes.TStrings.ExtractName
Delphi
function ExtractName(const S: string): string; overload; inline;
function ExtractName(const S: string; AllNames: Boolean): string; overload;
C++
System::UnicodeString __fastcall ExtractName(const System::UnicodeString S)/* overload */;
System::UnicodeString __fastcall ExtractName(const System::UnicodeString S, bool AllNames)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | protected | System.Classes.pas System.Classes.hpp |
System.Classes | TStrings |
Description
Returns the name portion of a string that is a name value pair.
TStrings calls ExtractName internally to parse strings that are name-value pairs and return the name portion.
S is the string to parse. If the string S:
- Is a name-value pair, ExtractName returns the name portion.
- Is not a name-value pair, ExtractName returns:
- The entire string S when
AllNamesisTrue. - An empty string when
AllNamesisFalse.- Note: If
AllNamesis not specified isFalseby default.
- Note: If
- The entire string S when