获得汉字拼音的首字母
摘要:
public string GetPYChar(string c) { byte[] array = new byte[2]; array = System.Text.Encoding.Default.GetBytes(c); int i = (short)(array[0] - '\0') * 256 + ((short)(array[1] - '\0')); if (i < 0xB0A1) return "*"; if (i < 0xB0C5) return "a"; if (i < 0xB2C1) 阅读全文
posted @ 2011-07-25 22:46 MichaelZhao 阅读(1305) 评论(4) 推荐(0) 编辑