RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStringBase::Format Method

System::AnsiStringBase::Formats a string assembled from an System::AnsiStringBase, format, and a series of array arguments, args.

Pascal
function Format(const format: AnsiStringBase&; const args: TVarRec *; size: Integer; codePage: Integer): AnsiStringBase; static;
C++
static __fastcall AnsiStringBase Format(const AnsiStringBase& format, const TVarRec * args, int size, int codePage);

Use System::AnsiStringBase::Format to obtain an System::AnsiStringBase whose value is the result of applying an array of arguments (args) to a given a format string (format). The last parameter (size) is the index of the last element in args (one less than the number of arguments). 

Note that System::AnsiStringBase::Format is a static method. The returned value is a newly allocated System::AnsiStringBase, even if the method is called from an existing System::AnsiStringBase instance. 

For information on how System::AnsiStringBase::Format assembles a final string from its format string and arguments, see System::AnsiStringBase::Format Strings. 

 

System::AnsiStringBase::printf 

System::AnsiStringBase::sprintf

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!