C++ Builder 參考手冊 ? System::Sysutils ? PlatformStringOf
把字節(jié)數(shù)組轉(zhuǎn)成字符串,采用 UTF-16 編碼
頭文件:#include <System.SysUtils.hpp>
命名空間:System::Sysutils
函數(shù)原型:
System::UnicodeString __fastcall PlatformStringOf(const System::DynamicArray<System::Byte> Value);
參數(shù):
- Value:字節(jié)數(shù)組
返回值:
- 把字節(jié)數(shù)組 Value 按照 UTF-16 編碼轉(zhuǎn)成的字符串;
- 與 StringOf 比較:
? StringOf 采用系統(tǒng)默認(rèn)的編碼,UTF-8 或 ANSI (請參考《C++ Builder 的字符串類型、字符類型轻要、字符編碼》);
? PlatformStringOf 采用 UTF-16 編碼; - PlatformStringOf 內(nèi)部通過調(diào)用 TEncoding::Unicode->GetString(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 參考手冊 ? System::Sysutils ? PlatformStringOf