Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
georgejecook
Level 7

Tokenize eliminates white space line? wt..FRICK :)

Is that really the case, and was requested as far back as 2015...

anyone got a workaround?
George Cook
https://linkedin.com/in/georgejecook/
Roku developers slack group (http://tiny.cc/nrdf0y) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
3 Replies
georgejecook
Level 7

Re: Tokenize eliminates white space line? wtf..

just found this function - another day, another astonishment Smiley Happy

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://linkedin.com/in/georgejecook/
Roku developers slack group (http://tiny.cc/nrdf0y) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
Roku Employee
Roku Employee

Re: Tokenize eliminates white space line? wtf..

"georgejecook" wrote:
Is that really the case, and was requested as far back as 2015...

anyone got a workaround?


First, regardless of the validity of your comment, do you really need to use disrespectful language?

Second, your complaint isn't very clear.  Possibly the roString Split function would do what you want?
0 Kudos
georgejecook
Level 7

Re: Tokenize eliminates white space line? wt..FRICK :)

disrespectful language? What disrespectful language?? ..! Look ^^^^ Smiley Very Happy

Seriously though - point taken: Sorry!

And yes! that function works a treat. Thank you!
George Cook
https://linkedin.com/in/georgejecook/
Roku developers slack group (http://tiny.cc/nrdf0y) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos