help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

FormatBuf

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

Declaration

Source position: line 0

function FormatBuf(

  var Buffer;

  BufLen: Cardinal;

  const Fmt;

  fmtLen: Cardinal;

  const Args: array of Const

):Cardinal;

function FormatBuf(

  var Buffer;

  BufLen: Cardinal;

  const Fmt;

  fmtLen: Cardinal;

  const Args: array of Const;

  const FormatSettings: TFormatSettings

):Cardinal;

Description

FormatBuf calls Format and stores the result in Buf.

See also

Format

  

Format a string with given arguments.

Example

Program Example72;

{ This program demonstrates the FormatBuf function }

Uses sysutils;

Var
  S : ShortString;

Const
  Fmt : ShortString =  'For some nice examples of fomatting see %s.';

Begin
  S:='';
  SetLength(S,FormatBuf (S[1],255,Fmt[1],Length(Fmt),['Format']));
  Writeln (S);
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505