📄 fun.txt
字号:
Public Function STR_ARRAY(STR As String, S As String, ARRAY_NUM As Integer) As Variant
Dim j As Integer, WZ As Integer
If Trim(STR) = "" Then
ARRAY_NUM = -1
Exit Function
End If
If InStr(1, STR, S) = 0 Then
ARRAY_NUM = -1
Exit Function
End If
If S = STR Then
ARRAY_NUM = -1
Exit Function
End If
j = 0
Dim SA() As String
Do Until Len(STR) = 0
WZ = InStr(1, STR, S)
If WZ <> 0 Then
ReDim Preserve SA(j) As String
SA(j) = Mid$(STR, 1, WZ - 1)
j = j + 1
STR = Mid$(STR, WZ + 1)
End If
If STR = S Then
Exit Do
End If
Loop
ARRAY_NUM = j
STR_ARRAY = SA
End Function
Public Function INT_ARRAY(STR As String, S As String, ARRAY_NUM As Integer) As Variant
Dim j As Integer, WZ As Integer
If Trim(STR) = "" Then
ARRAY_NUM = -1
Exit Function
End If
If InStr(1, STR, S) = 0 Then
ARRAY_NUM = -1
Exit Function
End If
If S = STR Then
ARRAY_NUM = -1
Exit Function
End If
j = 0
Dim SA() As Integer
Do Until Len(STR) = 0
WZ = InStr(1, STR, S)
If WZ <> 0 Then
ReDim Preserve SA(j) As Integer
SA(j) = CInt(Mid$(STR, 1, WZ - 1))
j = j + 1
STR = Mid$(STR, WZ + 1)
End If
If STR = S Then
Exit Do
End If
Loop
ARRAY_NUM = j
INT_ARRAY = SA
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -