RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.WideFormatBuf Function

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

Pascal
function WideFormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal; overload;
function WideFormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const FormatSettings: TFormatSettings): Cardinal; overload;
C++
unsigned WideFormatBuf( Buffer, unsigned BufLen, const  Format, unsigned FmtLen, const array of const Args);
unsigned WideFormatBuf( Buffer, unsigned BufLen, const  Format, unsigned FmtLen, const array of const Args, const TFormatSettings FormatSettings);

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 and FmtLen 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 FormatSettings parameter. Before calling the thread-safe form of WideFormatBuf, you must populate FormatSettings with localization information. To populate FormatSettings with a set of default locale values, call GetLocaleFormatSettings

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!