要一个自动按照字母排序的代码

来源:百度知道 编辑:UC知道 时间:2024/07/04 06:17:57
c#的

<%
function GetAsc(str)
str=Ucase(str)

'这段只是用来保留中文字间的数字,不要可删除
str=Replace(str,"0","a")
str=Replace(str,"1","b")
str=Replace(str,"2","c")
str=Replace(str,"3","d")
str=Replace(str,"4","e")
str=Replace(str,"5","f")
str=Replace(str,"6","g")
str=Replace(str,"7","h")
str=Replace(str,"8","i")
str=Replace(str,"9","j")
str=Replace(str," ","")

'开始取出
for i=1 to len(str)
chr_=mid(str,i,1)
asc_=asc(chr_)
if asc_>0 and asc_<128 then
helpchr_=helpchr_+mid(str,i,1)
else
casc_=asc_+65536
if casc_>=45217 and casc_<=45252 then
helpchr_=helpchr_+"A"
elseif casc_>=45253 and casc_<=45760 the