From RAD Studio API Documentation
Jump to: navigation, search


function ExtractFieldName(const Fields: string; var Pos: Integer): string;


extern DELPHI_PACKAGE System::UnicodeString __fastcall ExtractFieldName(const System::UnicodeString Fields, int &Pos)/* overload */;


Type Visibility Source Unit Parent
function public
Data.DB Data.DB


Returns the next name in a semicolon-delimited string of field names.

Use ExtractFieldName when parsing a semicolon-delimited string of names such as those used as parameters to many methods on database-specific objects.

Fields is a semicolon-delimited string of names.

Pos is the starting position of the next string in Fields. On exit from the function, Pos is updated to the starting position of the following string. If there is no following string, on exit, Pos is one more than the length of Fields.

ExtractFieldName returns a string with the single name that began at position Pos when the function was called.

ExtractFieldName is typically used in a loop, as follows:

Pos := 1;

while Pos <= Length(FieldNames) do begin Name := ExtractFieldName(FieldNames, Pos); // do something with Name end;

int Pos = 1;

while (Pos <= FieldNames.Length()) { AnsiString Name = ExtractFieldName(FieldNames, Pos); // do something with Name }

See Also