C++ Builder 參考手冊(cè) ? System::Sysutils ? PlatformBytesOf
把字符串轉(zhuǎn)成字節(jié)數(shù)組蹦狂,采用 UTF-16 編碼
頭文件:#include <System.SysUtils.hpp>
命名空間:System::Sysutils
函數(shù)原型:
System::DynamicArray<System::Byte> __fastcall PlatformBytesOf(const System::UnicodeString Value);
參數(shù):
- Value:字符串
返回值:
- 把 Value 按照 UTF-16 編碼轉(zhuǎn)成的字節(jié)數(shù)組朋贬;
- 與 BytesOf 比較:
? BytesOf 采用系統(tǒng)默認(rèn)的編碼窜骄,UTF-8 或 ANSI (請(qǐng)參考《C++ Builder 的字符串類型邻遏、字符類型、字符編碼》)准验;
? PlatformBytesOf 采用 UTF-16 編碼; - PlatformBytesOf 內(nèi)部通過調(diào)用 TEncoding::Unicode->GetBytes(Value); 來實(shí)現(xiàn)的垂寥。
相關(guān):
- System::Sysutils::BytesOf
- System::Sysutils::WideBytesOf
- System::Sysutils::PlatformBytesOf
- System::Sysutils::StringOf
- System::Sysutils::WideStringOf
- System::Sysutils::PlatformStringOf
- System::Sysutils::ByteLength
- System::Sysutils::CharLength
- System::Sysutils::StrCharLength
- System::Sysutils::AnsiLastChar
- System::Sysutils::AnsiStrLastChar
- System::Sysutils::AnsiPos
- System::Sysutils::AnsiStrPos
- System::Sysutils::AnsiStrScan
- System::Sysutils::AnsiStrRScan
- System::Sysutils::CharToElementIndex
- System::Sysutils::CharToElementLen
- System::Sysutils::ElementToCharIndex
- System::Sysutils::ElementToCharLen
- System::Sysutils::TEncoding
- System::Sysutils
- std::mblen
- std::_mbstrlen
- <cstdlib>
- std::strlen, std::_fstrlen, std::_tcslen, std::wcslen
- <cstring>
C++ Builder 參考手冊(cè) ? System::Sysutils ? PlatformBytesOf