本帖最后由 rainbow73 于 2014-6-21 18:02 编辑
win7下搜狗拼音 "ca"开头的字均转为”B", “挖”字转为"T",
结合“选秀”及楼主及本人应用需求,改为:
Public Function LChin(myStr)
Dim str$, L$, temp$
str = Replace(Replace(myStr, " ", ""), " ", "")
dict = [{"吖","a";"八","b";"擦","c";"咑","d";"鵽","e";"发","f";"伽","g";"哈","h";"丌","j";"咔","k";"垃","l";"妈","m";"拿","n";"哦","o";"妑","p";"七","q";"然","r";"仨","s";"他","t";"屲","w";"夕","x";"丫","y";"帀","z"}]
For i = 1 To Len(str)
L = Mid$(str, i, 1)
If L Like "[一-龥]" Then
temp = temp & UCase(Application.Lookup(L, dict))
Else
temp = temp & L
End If
Next i
LChin = temp
End Function
|