asp 取得中文句子头一个字的大写拼音字母的函数_ASP教程-查字典教程网
asp 取得中文句子头一个字的大写拼音字母的函数
asp 取得中文句子头一个字的大写拼音字母的函数
发布时间:2016-12-29 来源:查字典编辑
摘要:取得中文句子头一个字的大写拼音字母=45217Andtmp=45253Andtmp=45761Andtmp=46318Andtmp=4682...

取得中文句子头一个字的大写拼音字母

<%

'******************************

'函数:getpychar(char)

'参数:char,任意中文字符或句子

'作者:阿里西西

'日期:2007/7/15

'描述:取得中文句子头一个字的大写拼音字母

'示例:getpychar("欢迎访问阿里西西")

'******************************

Functiongetpychar(char)

Dimtmp

tmp=65536+Asc(char)

If(tmp>=45217Andtmp<=45252)Then

getpychar="A"

ElseIF(tmp>=45253Andtmp<=45760)Then

getpychar="B"

ElseIF(tmp>=45761Andtmp<=46317)Then

getpychar="C"

ElseIF(tmp>=46318Andtmp<=46825)Then

getpychar="D"

ElseIF(tmp>=46826Andtmp<=47009)Then

getpychar="E"

ElseIF(tmp>=47010Andtmp<=47296)Then

getpychar="F"

ElseIF(tmp>=47297Andtmp<=47613)Then

getpychar="G"

ElseIF(tmp>=47614Andtmp<=48118)Then

getpychar="H"

ElseIF(tmp>=48119Andtmp<=49061)Then

getpychar="J"

ElseIF(tmp>=49062Andtmp<=49323)Then

getpychar="K"

ElseIF(tmp>=49324Andtmp<=49895)Then

getpychar="L"

ElseIF(tmp>=49896Andtmp<=50370)Then

getpychar="M"

ElseIF(tmp>=50371Andtmp<=50613)Then

getpychar="N"

ElseIF(tmp>=50614Andtmp<=50621)Then

getpychar="O"

ElseIF(tmp>=50622Andtmp<=50905)Then

getpychar="P"

ElseIF(tmp>=50906Andtmp<=51386)Then

getpychar="Q"

ElseIF(tmp>=51387Andtmp<=51445)Then

getpychar="R"

ElseIF(tmp>=51446Andtmp<=52217)Then

getpychar="S"

ElseIF(tmp>=52218Andtmp<=52697)Then

getpychar="T"

ElseIF(tmp>=52698Andtmp<=52979)Then

getpychar="W"

ElseIF(tmp>=52980Andtmp<=53640)Then

getpychar="X"

ElseIF(tmp>=53689Andtmp<=54480)Then

getpychar="Y"

ElseIF(tmp>=54481Andtmp<=62289)Then

getpychar="Z"

Else'如果不是中文,则不处理

getpychar=char

EndIf

EndFunction

%>

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新ASP教程学习
    热门ASP教程学习
    编程开发子分类