Esempio n. 1
0
        /// <summary>
        /// 得到字符串的拼音首字母
        /// </summary>
        /// <param name="chineseString"></param>
        /// <returns></returns>
        public static string GetEnglishHead(string chineseString)
        {
            string cc  = Hz2Pin.Convert(chineseString);
            string str = "";

            foreach (char c1 in cc.ToCharArray())
            {
                str += Hz2Pin.Convert(c1.ToString())[0];
            }
            return(str.ToLower());
        }
Esempio n. 2
0
 /// <summary>
 /// 得到中文全拼
 /// </summary>
 /// <param name="chineseString"></param>
 /// <returns></returns>
 public static string GetEnglistString(string chineseString)
 {
     return(Hz2Pin.Convert(chineseString));
 }