string.bas

来自「此程序用来分离一个字符串中的数字及字符」· BAS 代码 · 共 24 行

BAS
24
字号
Attribute VB_Name = "Module1"
Public Function CheckString(ByVal sStr As String) As String
'Written by Richard Leonard spla@earthling.net
'this function keeps whatever the variable Do_This is set to

    Dim i As Integer
    Dim StrHolder As String
    Dim TempHolder As String
    Dim Do_This As String
    
    Do_This = Form1.txtDoThis.Text
    
     For i = 1 To Len(sStr)
        TempHolder = Mid(sStr, i, 1)
        If TempHolder Like Do_This Then
            StrHolder = StrHolder & Mid(sStr, i, 1)
        End If
     Next i
     sStr = StrHolder
     CheckString = sStr
     
End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?