ByteLength - C++ Builder

C++ Builder 参考手册System::SysutilsByteLength


字符串的字节数

头文件:#include <System.SysUtils.hpp>
命名空间:System::Sysutils
函数原型:

int __fastcall ByteLength(const System::UnicodeString S);

参数:

  • S:字符串

返回值:

  • 字符串的字节数,不包括结束符;
  • 由于 S 是 UTF-16 编码的,所以字节数始终等于字符串长度的二倍,即 S.Length()*2。

相关:

  • 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
  • std::mblen
  • std::_mbstrlen
  • <cstdlib>
  • std::strlen, std::_fstrlen, std::_tcslen, std::wcslen
  • <cstring>

C++ Builder 参考手册System::SysutilsByteLength

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容