System.SysUtils.FormatBuf

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function FormatBuf(Buffer: PWideChar; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function FormatBuf(Buffer: PWideChar; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;
function FormatBuf(var Buffer: UnicodeString; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function FormatBuf(var Buffer: UnicodeString; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;
function FormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;

C++

extern DELPHI_PACKAGE unsigned __fastcall FormatBuf _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (void *Buffer, unsigned BufLen, const void *Format, unsigned FmtLen, const System::TVarRec *Args, const int 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 FormatBuf is deprecated. Please use the AnsiStrings unit.

Formats the arguments from an array, placing the result in a buffer.

This function formats the series of arguments in the specified open array into a text buffer.

Buffer is the text buffer that receives the results.

BufLen is the number of characters in Buffer.

Format is the format string that determines how arguments are formatted. For information on the format strings, see Format strings.

FmtLen is the number of characters in Format.

Args are the arguments that replace the format specifiers in Format.

Note: Args_Size is the index of the last element in Args (one less than the number of arguments).

FormatBuf function returns number of characters stored in Buffer.

The first form of FormatBuf is not thread-safe, because it uses localization information contained in global variables. The second form of FormatBuf, which is thread-safe, refers to localization information contained in the AFormatSettings parameter. Before calling the thread-safe form of FormatBuf, you must populate AFormatSettings with localization information. To populate AFormatSettings with a set of default locale values, call TFormatSettings.Create.

See Also