Get the length of string that may include Chinese character.
a = system.text.encoding.default.getbytes(str);
a.length;
In the this length calculation,Chinese Character will be 2, English character wiil be 1.
Get the length of string that may include Chinese character.
a = system.text.encoding.default.getbytes(str);
a.length;
In the this length calculation,Chinese Character will be 2, English character wiil be 1.
1624
1242

被折叠的 条评论
为什么被折叠?