len(),lift(),right()不能正常识别中文的解决方法
2005-01-03 10:35
411 查看
以下用法和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
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
相关文章推荐
- len(),lift(),right()不能正常识别中文的解决方法
- 在fedora17 64位 上安装linux qq以及解决中文输入法不能正常使用的方法
- KDE挂载Windows分区不能正常显示中文文件的解决方法
- 发布到SPS站点下的ASP.NET页面上的中文不能正常显示__问题解决方法
- IntelliJ IDEA Export to Eclipse Android工程不能正常被Eclipse识别的解决方法
- Ubuntu下搜狗拼音不能正常输入中文问题解决方法
- jasperreport导出pdf中文数据不能正常显示的解决方法
- 【ubuntu】ubuntu下安装的输入法在netbeans中不能正常输出中文的解决方法
- IntelliJ IDEA Export to Eclipse Android工程不能正常被Eclipse识别的解决方法
- vim中不能正常显示中文的解决方法
- Windows不能识别手机 分析思路与解决方法
- 设置iptables之后不能正常访问ftp解决方法
- VC6里改变对话框资源ID号后classwizard不能正常显示控件ID的原因及解决方法
- windows2003 系统下不能识别移动硬盘解决方法
- myeclipse中直接复制的项目或项目改名后不能正常运行的解决方法
- android imageview 图片不能正常显示 或不能自适应的解决方法
- 语言栏不见和不能输入中文的解决方法
- OSPF邻居关系不能正常建立的原因和解决方法
- SQLServer作业不能正常执行解决方法
- 解决DotNetNuke3.0.8菜单不能使用中文的方法