Login
网站首页 > 文章中心 > VB6

VB6判断字符串中是否包含 汉字 源代码分享

作者:小编 更新时间:2023-06-29 17:09:45 浏览量:175人看过

Private Function TGGPDHZ(ByVal tggText As String) As Boolean

    Dim l As Long

    Dim i As Long

    l = Len(tggText)

    TGGPDHZ = False

    For i = 1 To l

        If Asc(Mid(tggText, i, 1)) < 0 Then

            TGGPDHZ = True

            Exit Function

        End If

    Next

End Function


Private Sub Command1_Click()

MsgBox TGGPDHZ(Text1.Text) 'True:有中文;False:无中文

End Sub


版权声明:倡导尊重与保护知识产权,本站有部分资源、图片来源于网络,如有侵权,请联系我们修改或者删除处理。
转载请说明来源于"土嘎嘎" 本文地址:http://www.tugaga.com/jishu/vb/803.html
<<上一篇 2023-06-28
下一篇 >> 2023-06-29

编辑推荐

热门文章