asp汉字转拼音小写
2021-03-04 02:28
标签:for ase lca fun lse cti else 中文 tmp ‘//获取汉字的首字母 ,ANSII编码 asp汉字转拼音小写 标签:for ase lca fun lse cti else 中文 tmp 原文地址:https://www.cnblogs.com/ince/p/13269661.html
function getpychar(char)
dim tmpp:tmpp=65536+asc(char)
if(tmpp>=45217 and tmppgetpychar= "A"
elseif(tmpp>=45253 and tmppgetpychar= "B"
elseif(tmpp>=45761 and tmppgetpychar= "C"
elseif(tmpp>=46318 and tmppgetpychar= "D"
elseif(tmpp>=46826 and tmppgetpychar= "E"
elseif(tmpp>=47010 and tmppgetpychar= "F"
elseif(tmpp>=47297 and tmppgetpychar= "G"
elseif(tmpp>=47614 and tmppgetpychar= "H"
elseif(tmpp>=48119 and tmppgetpychar= "J"
elseif(tmpp>=49062 and tmppgetpychar= "K"
elseif(tmpp>=49324 and tmppgetpychar= "L"
elseif(tmpp>=49896 and tmppgetpychar= "M"
elseif(tmpp>=50371 and tmppgetpychar= "N"
elseif(tmpp>=50614 and tmppgetpychar= "O"
elseif(tmpp>=50622 and tmppgetpychar= "P"
elseif(tmpp>=50906 and tmppgetpychar= "Q"
elseif(tmpp>=51387 and tmppgetpychar= "R"
elseif(tmpp>=51446 and tmppgetpychar= "S"
elseif(tmpp>=52218 and tmppgetpychar= "T"
elseif(tmpp>=52698 and tmppgetpychar= "W"
elseif(tmpp>=52980 and tmppgetpychar= "X"
elseif(tmpp>=53689 and tmppgetpychar= "Y"
elseif(tmpp>=54481 and tmppgetpychar= "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
%>