|
 |
 |
 |
 |
| 地址:武昌街道口阜华大厦A座806室 |
| 邮编:430070 |
| 电话:027-63223070 |
| 027-87164817 |
| 邮箱:wh@waibaohao.com |
|
 |
|
 |
|
|
| |
|
| len(),lift(),right()不能正常识别中文的解决方法 |
 |
| 来源:本站原创 点击数: |
以下用法和len(),lift(),right()一样。
Function Strlength(Str) Temp_Str=Len(Str) For I=1 To Temp_Str Test_Str=(Mid(Str,I,1)) If Asc(Test_Str)〉0 Then Strlength=Strlength+1 Else Strlength=Strlength+2 End If Next End Function Function Strleft(Str,L) Temp_Str=Len(Str) For I=1 To Temp_Str Test_Str=(Mid(Str,I,1)) Strleft=Strleft&Test_Str If Asc(Test_Str)〉0 Then lens=lens+1 Else lens=lens+2 End If If lens〉=L Then Exit For Next End Function Function Strright(Str,L) Temp_Str=Len(Str) For i = Temp_Str to 1 step -1 Test_Str=(Mid(Str,I,1)) Strright=Test_Str&Strright If Asc(Test_Str)〉0 Then lens=lens+1 Else lens=lens+2 End If If lens〉=L Then Exit For Next End Function |
| 上一篇:用CSS来控制网页背景 |
| 下一篇:没有了 |
|
|
|
|