System.SysUtils.FormatBuf

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function FormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function FormatBuf(Buffer: PWideChar; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function FormatBuf(Buffer: PWideChar; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;
function FormatBuf(var Buffer: UnicodeString; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;
function FormatBuf(var Buffer: UnicodeString; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;
function FormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const; const AFormatSettings: TFormatSettings): Cardinal;

C++

extern DELPHI_PACKAGE unsigned __fastcall FormatBuf _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (void *Buffer, unsigned BufLen, const void *Format, unsigned FmtLen, const System::TVarRec *Args, const int Args_High)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils


説明

警告: FormatBuf の ANSI バージョンは廃止予定です。AnsiStrings ユニットを使用してください。

配列からの引数を書式設定して、その結果をバッファに入れます。

この関数は、指定されたオープン配列にある一連の引数を、テキスト バッファ内に書式設定して入れます。

Buffer は、結果を受け取るテキスト バッファです。

BufLen は、Buffer 内の文字数です。

Format は、引数がどのように書式設定されるかを指定する書式文字列です。文字列の書式に関する情報については、Format 文字列を参照してください。

FmtLen は、Format 内の文字数です。

Args は、Format の書式指定子を置き換える引数です。

メモ: Args_Size は、Args 内の最後の要素のインデックスです(引数の数より 1 少ない数)。

FormatBuf 関数は、バッファ内に保存される文字数を返します。

FormatBuf の第 1 の形式は、グローバル変数に含まれているローカライズ情報を使用するため、スレッド セーフではありません。 FormatBuf の第 2 の形式は、AFormatSettings パラメータに含まれているローカライズ情報を参照し、スレッドに対応しています。 FormatBuf のスレッド セーフ形式を呼び出す前に、AFormatSettings にローカライズ情報を入れる必要があります。 AFormatSettings にデフォルトのローカル値セットを入れるには、TFormatSettings.Create を呼び出します。

関連項目