vb汉字首字拼音获取
来源:互联网 发布:邱泽演技 知乎 编辑:程序博客网 时间:2024/04/28 22:39
Public Function py(mystr As String) As String
If Asc(mystr) < 0 Then
If Asc(Left(mystr, 1)) < Asc("啊") Then
py = "0"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("啊") And Asc(Left(mystr, 1)) < Asc("芭") Then
py = "A"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("芭") And Asc(Left(mystr, 1)) < Asc("擦") Then
py = "B"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("擦") And Asc(Left(mystr, 1)) < Asc("搭") Then
py = "C"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("搭") And Asc(Left(mystr, 1)) < Asc("蛾") Then
py = "D"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("蛾") And Asc(Left(mystr, 1)) < Asc("发") Then
py = "E"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("发") And Asc(Left(mystr, 1)) < Asc("噶") Then
py = "F"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("噶") And Asc(Left(mystr, 1)) < Asc("哈") Then
py = "G"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("哈") And Asc(Left(mystr, 1)) < Asc("击") Then
py = "H"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("击") And Asc(Left(mystr, 1)) < Asc("喀") Then
py = "J"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("喀") And Asc(Left(mystr, 1)) < Asc("垃") Then
py = "K"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("垃") And Asc(Left(mystr, 1)) < Asc("妈") Then
py = "L"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("妈") And Asc(Left(mystr, 1)) < Asc("拿") Then
py = "M"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("拿") And Asc(Left(mystr, 1)) < Asc("哦") Then
py = "N"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("哦") And Asc(Left(mystr, 1)) < Asc("啪") Then
py = "O"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("啪") And Asc(Left(mystr, 1)) < Asc("期") Then
py = "P"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("期") And Asc(Left(mystr, 1)) < Asc("然") Then
py = "Q"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("然") And Asc(Left(mystr, 1)) < Asc("撒") Then
py = "R"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("撒") And Asc(Left(mystr, 1)) < Asc("塌") Then
py = "S"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("塌") And Asc(Left(mystr, 1)) < Asc("挖") Then
py = "T"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("挖") And Asc(Left(mystr, 1)) < Asc("昔") Then
py = "W"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("昔") And Asc(Left(mystr, 1)) < Asc("压") Then
py = "X"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("压") And Asc(Left(mystr, 1)) < Asc("匝") Then
py = "Y"
Exit Function
End If
If Asc(Left(mystr, 1)) >= Asc("匝") Then
py = "Z"
Exit Function
End If
Else
If UCase(mystr) <= "Z" And UCase(mystr) >= "A" Then
py = UCase(Left(mystr, 1))
Else
py = mystr
End If
End If
End Function
- vb汉字首字拼音获取
- 汉字转拼音首字
- ajax获取汉字拼音首字符及笔画
- vb 获取字符串汉字拼音的首字母
- SQL获取拼音首字函数
- 类似qq的汉字拼音首字查询
- thinkphp按照汉字首字拼音排序
- Thinkphp按照汉字的首字拼音排序
- PHP获取汉字首字目
- 中文汉字转换成拼音首字 拼音全拼
- C#根据文字获取拼音、首字字母
- 过程功能:汉字转拼音首字*(visual foxpro)
- VB 汉字拼音及声调
- C# 获取汉字拼音
- 从汉字获取拼音
- 获取汉字拼音首字母
- 根据汉字获取拼音
- 获取汉字拼音首字母
- ASP.NET常用语句1--20条,(很实用的)
- 除asp中所有超链接
- c java php perl python 的程序代码美化工具
- 安全套接层SSL协议
- 循环冗余校验 CRC 的算法分析和程序实现
- vb汉字首字拼音获取
- 获取 Email 的通讯录邮箱
- Criteria 使用指南
- Link Test
- 在Linux使用Eclipse+CDT开发C/C++程序
- IBM应就智慧地球抄袭做出答复
- TextDialog.java中onTextChanged函数的解析
- SSL的工作原理
- Modem AT指令