Show: Object Pascal C++
Display Preferences


From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure FmtStr(var Result: string; const Format: string; const Args: array of const);
procedure FmtStr(var Result: string; const Format: string; const Args: array of const; const AFormatSettings: TFormatSettings);


extern DELPHI_PACKAGE void __fastcall FmtStr(System::UnicodeString &Result, const System::UnicodeString Format, System::TVarRec const *Args, const int Args_High)/* overload */;


Type Visibility Source Unit Parent
System.SysUtils System.SysUtils


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

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

Result represents the result of the operation.

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

Args is an array of arguments that replaces 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 AFormatSettings parameter. Before calling the thread-safe form of FmtStr, you must populate AFormatSettings with localization information. To populate AFormatSettings with a set of default locale values, call TFormatSettings.Create.

See Also

Personal tools