Show: Delphi C++
Display Preferences

System.SysUtils.FmtStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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);

C++

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

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

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
In Other Languages
Previous Versions
Assistance