ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

asp汉字转拼音小写

2020-07-08 22:41:06  阅读:325  来源: 互联网

标签:function asp 拼音 tmppgetpychar char 小写 elseif getpychar tmpp


<%
'//获取汉字的首字母 ,ANSII编码
function getpychar(char)
dim tmpp:tmpp=65536+asc(char)
if(tmpp>=45217 and tmpp<=45252) then
getpychar= "A"
elseif(tmpp>=45253 and tmpp<=45760) then
getpychar= "B"
elseif(tmpp>=45761 and tmpp<=46317) then
getpychar= "C"
elseif(tmpp>=46318 and tmpp<=46825) then
getpychar= "D"
elseif(tmpp>=46826 and tmpp<=47009) then
getpychar= "E"
elseif(tmpp>=47010 and tmpp<=47296) then
getpychar= "F"
elseif(tmpp>=47297 and tmpp<=47613) then
getpychar= "G"
elseif(tmpp>=47614 and tmpp<=48118) then
getpychar= "H"
elseif(tmpp>=48119 and tmpp<=49061) then
getpychar= "J"
elseif(tmpp>=49062 and tmpp<=49323) then
getpychar= "K"
elseif(tmpp>=49324 and tmpp<=49895) then
getpychar= "L"
elseif(tmpp>=49896 and tmpp<=50370) then
getpychar= "M"
elseif(tmpp>=50371 and tmpp<=50613) then
getpychar= "N"
elseif(tmpp>=50614 and tmpp<=50621) then
getpychar= "O"
elseif(tmpp>=50622 and tmpp<=50905) then
getpychar= "P"
elseif(tmpp>=50906 and tmpp<=51386) then
getpychar= "Q"
elseif(tmpp>=51387 and tmpp<=51445) then
getpychar= "R"
elseif(tmpp>=51446 and tmpp<=52217) then
getpychar= "S"
elseif(tmpp>=52218 and tmpp<=52697) then
getpychar= "T"
elseif(tmpp>=52698 and tmpp<=52979) then
getpychar= "W"
elseif(tmpp>=52980 and tmpp<=53640) then
getpychar= "X"
elseif(tmpp>=53689 and tmpp<=54480) then
getpychar= "Y"
elseif(tmpp>=54481 and tmpp<=62289) then
getpychar= "Z"
else '如果不是中文,则不处理
getpychar=char
end if
end function
'//生成汉字串首字母串
function getpy(str)
for i=1 to len(str)
getpy=getpy & getpychar(mid(str,i,1))
next
end function
%>
<%=LCase(getpy("汉字转拼音首字母小写"))%>

标签:function,asp,拼音,tmppgetpychar,char,小写,elseif,getpychar,tmpp
来源: https://www.cnblogs.com/ince/p/13269661.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有