RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStringT::Format Method

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

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

Use System::AnsiStringT::Format to obtain an System::AnsiStringT 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::AnsiStringT::Format is a static method. The returned value is a newly allocated System::AnsiStringT, even if the method is called from an existing System::AnsiStringT instance. 

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

 

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