just found this function - another day, another astonishment
🙂Function FW_Split(toSplit As String, delim As String, bIncludeEmpties = false As Boolean) As Object
result = []
If bIncludeEmpties Then
If Not FW_IsNullOrEmpty(toSplit) Then
char = 0
While char <= toSplit.Len()
match = toSplit.Instr(char, delim)
If match = -1 Then
result.Push(toSplit.Mid(char))
Exit While
End If
If match >= char Then
result.Push(toSplit.Mid(char, match - char))
char = match
End If
char = char + delim.Len()
End While
End If
Else
st = CreateObject("roString")
st.SetString(toSplit)
result = st.Tokenize(delim)
End If
Return result
End Function
George Cook
https://georgejecook.github.io/
https://linkedin.com/in/georgejecook/
Roku developers slack group (https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) : georgejecook
Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework