C++ Builder 參考手冊(cè) ? System::Sysutils ? FormatBuf
格式化數(shù)據(jù)到字符串
頭文件:#include <System.SysUtils.hpp>
命名空間:System::Sysutils
函數(shù)原型:
unsigned __fastcall FormatBuf(void *Buffer, unsigned BufLen,
const void *Format, unsigned FmtLen,
const System::TVarRec *Args, const int Args_High);
unsigned __fastcall FormatBuf(ystem::WideChar * Buffer, unsigned BufLen,
const void *Format, unsigned FmtLen,
const System::TVarRec *Args, onst int Args_High);
unsigned __fastcall FormatBuf(ystem::WideChar * Buffer, unsigned BufLen,
const void *Format, unsigned FmtLen,
const System::TVarRec *Args, const int Args_High,
const TFormatSettings &AFormatSettings);
unsigned __fastcall FormatBuf(System::UnicodeString &Buffer, unsigned BufLen,
const void *Format, unsigned FmtLen,
const System::TVarRec *Args, const int Args_High);
unsigned __fastcall FormatBuf(System::UnicodeString &Buffer, unsigned BufLen,
const void *Format, unsigned FmtLen,
const System::TVarRec *Args, const int Args_High,
const TFormatSettings &AFormatSettings);
unsigned __fastcall FormatBuf(void *Buffer, unsigned BufLen,
const void *Format, unsigned FmtLen,
const System::TVarRec *Args, const int Args_High,
const TFormatSettings &AFormatSettings);
參數(shù):
- Buffer:用于返回生成的字符串罪既;
- BufLen:參數(shù) Buffer 的長(zhǎng)度 (可以容納的字符個(gè)數(shù));
- Format:輸出數(shù)據(jù)的格式呵恢;
- FmtLen:參數(shù) Format 的長(zhǎng)度 (包含字符的個(gè)數(shù))峡懈;
- Args:要輸出的數(shù)據(jù)數(shù)組落追;
- Args_High:數(shù)據(jù)的個(gè)數(shù)減1;
- AFormatSettings:地區(qū)格式;
返回值:
- 按照 Format 參數(shù)的格式輸出參數(shù) Args 數(shù)據(jù)到字符串坎穿,通過(guò)參數(shù) Buffer 返回生成的字符串;
- 這個(gè)函數(shù)的參數(shù)及生成的字符串規(guī)則和 Format 函數(shù)相同返劲。
- 沒有 AFormatSettings 參數(shù)的函數(shù)不是線程安全的玲昧,因?yàn)槭褂昧巳肿兞孔鳛榈貐^(qū)格式;帶有 AFormatSettings 參數(shù)的函數(shù)是線程安全的篮绿。
相關(guān):
- System::Sysutils::Format
- System::Sysutils::FormatBuf
- System::Sysutils::FormatCurr
- System::Sysutils::FormatDateTime
- System::Sysutils::FormatFloat
- System::Sysutils::FmtStr
- System::Sysutils::FmtLoadStr
- System::Sysutils::StrFmt
- System::Sysutils::StrLFmt
- System::Sysutils::WideFormat
- System::Sysutils::WideFormatBuf
- System::Sysutils::WideFmtStr
- System::Sysutils
- std::printf, std::_tprintf, std::wprintf
- std::sprintf, std::_stprintf, std::swprintf
- std::vprintf, std::_vtprintf, std::vwprintf
- std::vsprintf, std::_vstprintf, std::vswprintf
- std::snprintf, std::_sntprintf, std::snwprintf
- std::vsnprintf, std::_vsntprintf, std::vsnwprintf
- <cstdio>
C++ Builder 參考手冊(cè) ? System::Sysutils ? FormatBuf