java 统计字符串字节大小

string str = "ABC";
int s= System.Text.Encoding.GetEncoding("GB2312").GetByteCount(str);

猜你喜欢

转载自xxxxxxxx-rui.iteye.com/blog/1019642