System.SysUtils.StrFmt
Delphi
function StrFmt(Buffer, Format: PAnsiChar; const Args: array of const): PAnsiChar;
function StrFmt(Buffer, Format: PWideChar; const Args: array of const): PWideChar;
function StrFmt(Buffer, Format: PAnsiChar; const Args: array of const;
const AFormatSettings: TFormatSettings): PAnsiChar;
function StrFmt(Buffer, Format: PWideChar; const Args: array of const;
const AFormatSettings: TFormatSettings): PWideChar;
C++
extern DELPHI_PACKAGE char * __fastcall StrFmt _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (char * Buffer, char * Format, const System::TVarRec *Args, const System::NativeInt Args_High)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Warning: The ANSI version of StrFmt is deprecated. Please use the AnsiStrings unit.
Formats entries in an array.
StrFmt formats the series of arguments from an open array into a buffer.
Buffer
is a buffer that receives the results.
Format
is a null-terminated format string that indicates how to generate the results. For more information about how the result is formatted, see Format strings.
Args
is an array of arguments that replaces the format specifiers in Format.
Note:
Args_Size
gives the index of the last argument (one less than the number of elements inArgs
).
StrFmt returns a pointer to the destination buffer.
The first form of StrFmt is not thread-safe, because it uses localization information contained in global variables. The second form of StrFmt, which is thread-safe, refers to localization information contained in the AFormatSettings
parameter. Before calling the thread-safe form of StrFmt, you must populate AFormatSettings
with localization information. To populate AFormatSettings
with a set of default locale values, call TFormatSettings.Create.