摘要: //字符是否为汉字 public bool IsChinese(char c) { return (int)c >= 0x4E00 && (int)c <= 0x9FA5; } //获得字节长度 private int getLengthb(string str) { return System.Text.Encoding.Default.GetByteCount(str); } //c#的中英文混合字符串截取指定长度,startidx从0开始 by gisoracle@126.com public string getStrLenB(string str, int 阅读全文
posted @ 2012-08-29 14:27 赤狐(zcm123) 阅读(203) 评论(0) 推荐(0) 编辑