Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

StrFmt

Format a string with given arguments, store the result in a buffer.

Declaration

Source position: sysstrh.inc line 159

function StrFmt(

  Buffer: PChar;

  Fmt: PChar;

  const args: array of Const

):PChar;

function StrFmt(

  Buffer: PChar;

  Fmt: PChar;

  const Args: array of Const;

  const FormatSettings: TFormatSettings

):PChar;

Description

StrFmt will format fmt with Args, as the Format function does, and it will store the result in Buffer. The function returns Buffer. Buffer should point to enough space to contain the whole result.

Errors

for a list of errors, see Format.

See also

StrLFmt

  

Format a string with given arguments, but with limited length.

FmtStr

  

Format a string with given arguments.

Format

  

Format a string with given arguments.

FormatBuf

  

Format a string with given arguments and store the result in a buffer.

Example

Program Example80;

{ This program demonstrates the StrFmt function }

Uses sysutils;

Var S : AnsiString;

Begin
  SetLEngth(S,80);
  Writeln (StrFmt (@S[1],'For some nice examples of fomatting see %s.',['Format']));
End.

Documentation generated on: Oct 02 2024