首页 > 资讯 > 网站设计
len(),lift(),right()不能正常识别中文的解决方法
发布时间:2005-03-17   浏览次数:1153391
[ 来源:动网 ] 以下用法和len(),lift(),right()一样。 Function Strlength(Str)Temp_Str=Len(Str)For I=1 To Temp_StrTest_Str=(Mid(Str,I,1))If Asc(Test_Str)>0 ThenStrlength=Strlength+1ElseStrlength=Strlength+2End IfNextEnd FunctionFunction Strleft(Str,L)Temp_Str=Len(Str)For I=1 To Temp_StrTest_Str=(Mid(Str,I,1))Strleft=Strleft&Test_StrIf Asc(Test_Str)>0 Thenlens=lens+1Elselens=lens+2End IfIf lens>=L Then Exit ForNextEnd FunctionFunction Strright(Str,L)Temp_Str=Len(Str)For i = Temp_Str to 1 step -1Test_Str=(Mid(Str,I,1))Strright=Test_Str&StrrightIf Asc(Test_Str)>0 Thenlens=lens+1Elselens=lens+2End IfIf lens>=L Then Exit ForNextEnd Function 来源:http://edu.chinaz.com
业务咨询

Copyright 2003 - 2023 huinet.cn All Rights Reserved.
慧网公司 版权所有