Domino Code Fragment

Code Name*
Equivalent LotusScript Explode function
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.137.192.3
Description*
Here is an example I use for explode: Lineinput is the string to be parsed out. Sep is the separator (unfortunately this version only supports one character separators) Linearray is the array which is where you want your values.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

Sub Explode(LineInput As String, Sep As String, LineArray() As Variant)
Dim Value As String
Dim x As Integer
Dim y As Integer


Value = ""
x = 0
y = 0


Do While (Len(LineInput) > x)
x = x +1
If (Mid(LineInput,x,1) = Sep) Then
y = y + 1
Redim Preserve LineArray(1 To y) As Variant
LineArray(y) = Trim(value)
value = ""
Else
Value = Value + Mid(LineInput,x,1)
End If
Loop
y = y + 1
Redim Preserve LineArray(1 To y) As Variant
LineArray(y) = Trim(value)
value = ""
End Sub