返回字串的拼音首字母
来源:互联网 发布:淘宝软件定价策略 编辑:程序博客网 时间:2024/04/26 05:23
//////////////////////////////////////////////////////////////
file://函数名:gf_getfirstletter(string)
file://功能:返回字串的拼音首字母,支持混合字符串(可以包含非汉字)
file://参数:as_inputstring
file://返回值:string
file://created 大同 张和平 dtzhp@yeah.net
//////////////////////////////////////////////////////////////
long i
string ls_ch,ls_returnStr
For i=1 to Len(as_InputString) file://依次处理as_InputString中每个字符
ls_ch=Mid(as_InputString , i , 1)
If ls_ch < "啊" then // 非汉字
ls_returnStr = ls_returnStr+ls_ch // 不变
Elseif ls_ch >= "啊" and ls_ch <= "座" then file://处理一级汉字
CHOOSE CASE ls_ch
CASE is >= '匝'
ls_returnStr += "z"
CASE is >= '压'
ls_returnStr += "y"
CASE is >= '昔'
ls_returnStr += "x"
CASE is >= '挖'
ls_returnStr += "w"
CASE is >= '塌'
ls_returnStr += "t"
CASE is >= '撒'
ls_returnStr += "s"
CASE is >= '然'
ls_returnStr += "r"
CASE is >= '期'
ls_returnStr += "q"
CASE is >= '啪'
ls_returnStr += "p"
CASE is >= '哦'
ls_returnStr += "o"
CASE is >= '拿'
ls_returnStr += "n"
CASE is >= '妈'
ls_returnStr += "m"
CASE is >= '垃'
ls_returnStr += "l"
CASE is >= '喀'
ls_returnStr += "k"
CASE is >= '击'
ls_returnStr += "j"
CASE is >= '哈'
ls_returnStr += "h"
CASE is >= '噶'
ls_returnStr += "g"
CASE is >= '发'
ls_returnStr += "f"
CASE is >= '蛾'
ls_returnStr += "e"
CASE is >= '搭'
ls_returnStr += "d"
CASE is >= '擦'
ls_returnStr += "c"
CASE is >= '芭'
ls_returnStr += "b"
CASE is >= '啊'
ls_returnStr += "a"
END CHOOSE
// elseif ls_ch > "座" then file://处理一级汉字
// select py into :ls_py from piyin where hanzi = :ls_ch;
End if
// i = i+1 file://PB8不用此句,而PB65要用, 指向下一个汉字
Next
RETURN ls_returnStr
<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>
- 返回字串的拼音首字母
- 返回字串的拼音首字母
- ios-返回汉子拼音首字母
- 获取拼音首字母(传入汉字字符串, 返回大写拼音首字母)
- 汉字的拼音首字母
- SQL语句提取出中文的拼音首字母 sql 语句返回中文姓名的首字母缩写
- IOS开发把汉字转换成拼音的两种方法和返回拼音首字母
- 中文字 变 拼音,返回首字母
- SQL函数返回汉字拼音首字母
- oracle返回中文拼音首字母方法
- asp.net汉字转拼音 可返回拼音首字母
- 获取汉语字串的拼音
- 得到汉字的拼音首字母
- 取汉字的拼音首字母
- 获取汉字的拼音首字母
- 获取汉字的拼音首字母
- 获取汉字的拼音首字母
- 获取汉字的拼音首字母
- .Net平台Windows Forms程序设计简介 -2
- 整理的一些常用系统表
- webservice系列教学(8)-如何调用webservice(vb.net)
- TIMESTAMP列类型详解(怎样设列的默认值为Now())
- 如何使用数据查询的Parameters中的output属性取的返回值
- 返回字串的拼音首字母
- Vb.Net问题集 (转贴于此)
- 防止ADO连接SQL Server时的隐式连接
- 探究Singleton设计模式
- PowerBuilder中回车键的应用
- ASP+与ASP有什么不同
- 关于软件权限设置的一点心得体会
- .NET中的特殊类型成员----微软 .NET平台系列文章之三(译文/赵湘宁)
- SCO UNIX下磁带机的安装与备份