// 英文汉字均视作长度为1
String.Length
// 英文长度为1,汉字长度为2
Encoding.Default.GetBytes(str).Length
获取字符串长度
最新推荐文章于 2022-06-19 20:17:48 发布
// 英文汉字均视作长度为1
String.Length
// 英文长度为1,汉字长度为2
Encoding.Default.GetBytes(str).Length