截取实际长度字符串,并用空格替换
function cutstr(thestr,strlen)dim l,t,cl=len(thestr)t=0for dxy=1 to lc=Abs(asc(Mid(thestr,dxy,1)))if c>255 thent=t+2elset=t+1end ifif t>=strlen
function cutstr(thestr,strlen)dim l,t,cl=len(thestr)t=0for dxy=1 to lc=Abs(asc(Mid(thestr,dxy,1)))if c>255 thent=t+2elset=t+1end ifif t>=strlen
n";print "Encrypted text : $enc_text n";print "Decrypted text : $dec_text n";?>
asp 字符串截取函数'********************************************************* '函数:cutStr[str(strlen)] '参数:str,待处理的字符串,strlen,截取的长度 '作者:木木 '日期:2007/7/12 '描述:截取
",">"),"255 thent=t+2elset=t+1end ifif t>=strlen thengotTopic=left(str,i) & "…"exit forelsegotTopic=strend ifnextgotTopic=replace(replace(re