当前位置: 编程技术>.net/c#/asp.net
asp.net 取中文汉字第一个拼音字母的代码
来源: 互联网 发布时间:2014-08-30
本文导语: 代码如下: public class ChsSpell { /**//// /// 取中文汉字的第一个拼音字母 /// /// 中字汉字 /// 大写拼音首字母 /// by www. public string GetChsSpell(string strText) { int len = strText.Length; string myStr = ""; ...
代码如下:
public class ChsSpell
{
/**////
/// 取中文汉字的第一个拼音字母
///
/// 中字汉字
/// 大写拼音首字母
/// by www.
public string GetChsSpell(string strText)
{
int len = strText.Length;
string myStr = "";
for(int i=0;i 1)
{
int area = (short)arrCN[0];
int pos = (short)arrCN[1];
int code = (area