⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parse.bas

📁 常用基本函数库,也许你需要的正在其中!如果不做程序
💻 BAS
字号:
Option Explicit

Function Parse$ (ByVal sString As String, iReq As Integer, sDelim As String)
Dim sSt As String, iCnt As Integer, iPos As Integer

    If Len(sDelim) = 0 Then sDelim = ","
    sSt = sString & sDelim
    For iCnt = 1 To iReq
        iPos = InStr(sSt, sDelim)
        If iPos Then
            If iCnt = iReq Then     ' Requested string
                Parse$ = Left$(sSt, iPos - 1)
                Exit For
            End If
            If iPos = Len(sSt) Then ' No string left
                Parse$ = ""
                Exit For
            End If
            sSt = Mid$(sSt, iPos + Len(sDelim))
        Else
            Parse$ = sSt
            Exit For
        End If
    Next iCnt
End Function

⌨️ 快捷键说明

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