RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.FmtStr Function

Assembles a formatted string using a format string and an array of arguments.

Pascal
procedure FmtStr(var Result: string; const Format: string; const Args: array of const); overload;
procedure FmtStr(var Result: string; const Format: string; const Args: array of const; const FormatSettings: TFormatSettings); overload;
C++
FmtStr(AnsiString Result, const AnsiString Format, const array of const Args);
FmtStr(AnsiString Result, const AnsiString Format, const array of const Args, const TFormatSettings FormatSettings);

SysUtils

This function formats the series of arguments in the specified open (untyped) array. 

StrResult returns the results of the operation. 

Format is the format string that determines how to generate StrResult. For information on the format strings, see Format Strings. 

Args is an array of arguments that replace the format specifiers in Format.

Note: Args_Size specifies the index of the last element of Args (one less than the number of elements).
The first form of FmtStr is not thread-safe, because it uses localization information contained in global variables. The second form of FmtStr, which is thread-safe, refers to localization information contained in the FormatSettings parameter. Before calling the thread-safe form of FmtStr, you must populate FormatSettings with localization information. To populate FormatSettings with a set of default locale values, call GetLocaleFormatSettings

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!