汉字和字符串长度判断

来源:互联网 发布:海岛奇兵研究升级数据 编辑:程序博客网 时间:2024/06/10 13:40

int length = System.Text.Encoding.Default.GetBytes(str).Length;

就可以了!

 
原创粉丝点击