System.SysUtils.StrLFmt

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function StrLFmt(Buffer: PAnsiChar; MaxBufLen: Cardinal; Format: PAnsiChar;
const Args: array of const): PAnsiChar;
function StrLFmt(Buffer: PWideChar; MaxBufLen: Cardinal; Format: PWideChar;
const Args: array of const): PWideChar;
function StrLFmt(Buffer: PAnsiChar; MaxBufLen: Cardinal; Format: PAnsiChar;
const Args: array of const; const AFormatSettings: TFormatSettings): PAnsiChar;
function StrLFmt(Buffer: PWideChar; MaxBufLen: Cardinal; Format: PWideChar;
const Args: array of const;
const AFormatSettings: TFormatSettings): PWideChar;

C++

extern DELPHI_PACKAGE char * __fastcall StrLFmt _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (char * Buffer, unsigned MaxBufLen, char * Format, const System::TVarRec *Args, const System::NativeInt 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 StrLFmt is deprecated. Please use the AnsiStrings unit.

Formats a series of arguments from a specified open array into a buffer.

StrLFmt formats the series of arguments in an open array and writes the results to a buffer.

Buffer is the buffer that receives the results.

MaxLen is the maximum number of bytes that can be written to Buffer. This value does not include the terminating null character.

Format is the format string that governs the operation.

Args is an array of arguments that replaces the format specifiers in Format.

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

StrLFmt returns a pointer to the destination buffer.

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

See Also