System.SysUtils.WideFormatBuf
Delphi
function WideFormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function WideFormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;
C++
extern DELPHI_PACKAGE unsigned __fastcall WideFormatBuf(void *Buffer, unsigned BufLen, const void *Format, unsigned FmtLen, System::TVarRec const *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
Formats the arguments from an array, placing the result in a buffer.
This function formats the series of arguments in the open array Args
. Formatting is controlled by the Unicode format string Format (whose length is given by FmtLen
); the results are returned in Buffer
(whose length is given by BufLen
). The function returns the number of Unicode characters in the formatted string.
Note: Both buffers contain wide (Unicode) characters.
BufLen
andFmtLen
must specify the number of Unicode characters in their respective buffers, not the number of bytes.
For information on the format strings, see Format strings.
The first form of WideFormatBuf is not thread-safe, because it uses localization information contained in global variables. The second form of WideFormatBuf, which is thread-safe, refers to localization information contained in the AFormatSettings
parameter. Before calling the thread-safe form of WideFormatBuf, you must populate AFormatSettings
with localization information. To populate AFormatSettings
with a set of default locale values, call TFormatSettings.Create.