Ray*_*Ray 12 c string unicode utf-16 unicode-string
UTF-16字符串的字符串终止符序列是什么?
编辑:
让我重新解释一下这个问题,试图澄清一下.wcslen()工作电话怎么样?
Mic*_*tta 15
Unicode不定义字符串终止符.您的环境或语言.例如,C字符串使用0x0作为字符串终止符,其中.NET语言根本不使用字符串终止符 - 它们在String类中定义一个单独的值来存储字符串的长度.
要回答第二个问题,请wcslen查找终止L'\0'字符.在我读它时,它是任何长度的0x00字节,取决于编译器,但0x00 0x00如果你使用UTF-16(编码U + 0000,'NUL'),可能是两字节序列
7.24.4.6.1 wcslen函数(来自Standard)
...
Run Code Online (Sandbox Code Playgroud)[#3] The wcslen function returns the number of wide characters that precede the terminating null wide character.
空宽字符是 L'\0'
| 归档时间: |
|
| 查看次数: |
7617 次 |
| 最近记录: |