using hyjiacan.py4n;
namespace DS.Module.Core;
///
/// 汉字转拼音
///
public class PinYinUtil
{
///
/// 汉字转拼音首字母
///
///
///
public static string GetFristLetter(string str)
{
string ret = "";
char[] stra = str.ToCharArray();
foreach (char c in stra)
{
if (PinyinUtil.IsHanzi(c))
ret += Pinyin4Net.GetFirstPinyin(c).ToUpper().Substring(0, 1);
else
ret += c;
}
return ret;
}
}