返回字串的拼音首字母

来源:互联网 发布:软件如何注册 编辑:程序博客网 时间:2024/04/17 05:18
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

//////////////////////////////////////////////////////////////
file://函数名:gf_getfirstletter(string)
file://功能:返回字串拼音首字母,支持混合字符串(可以包含非汉字)
file://参数:as_inputstring
file://返回值:string
file://created大同张和平dtzhp@yeah.net
//////////////////////////////////////////////////////////////
longi
stringls_ch,ls_returnStr
Fori=1toLen(as_InputString)                file://依次处理as_InputString中每个字符
   ls_ch=Mid(as_InputString,i,1)     
     Ifls_ch<"啊" then                     // 非汉字
         ls_returnStr=ls_returnStr+ls_ch   // 不变
     Elseif   ls_ch>="啊"andls_ch<="座" then        file://处理一级汉字
    CHOOSECASEls_ch
       CASEis>='匝'
      ls_returnStr+="z"
       CASEis>='压'
      ls_returnStr+="y"
       CASEis>='昔'
      ls_returnStr+="x"
       CASEis>='挖'
      ls_returnStr+="w"
       CASEis>='塌'
      ls_returnStr+="t"
       CASEis>='撒'
      ls_returnStr+="s"
       CASEis>='然'
      ls_returnStr+="r"
       CASEis>='期'
      ls_returnStr+="q"
       CASEis>='啪'
      ls_returnStr+="p"
       CASEis>='哦'
      ls_returnStr+="o"
       CASEis>='拿'
      ls_returnStr+="n"
       CASEis>='妈'
      ls_returnStr+="m"
       CASEis>='垃'
      ls_returnStr+="l"
       CASEis>='喀'
      ls_returnStr+="k"
       CASEis>='击'
      ls_returnStr+="j"
       CASEis>='哈'
      ls_returnStr+="h"共2页  1 <script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击