System.Classes.TStrings.ExtractName

From RAD Studio API Documentation
Jump to: navigation, search

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 AllNames is True.
    • An empty string when AllNames is False.
      Note: If AllNames is not specified is False by default.

See Also