Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
georgejecook
Streaming Star

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://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
0 Kudos
3 REPLIES 3
georgejecook
Streaming Star

Re: Tokenize eliminates white space line? wtf..

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
0 Kudos
RokuKC
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
Streaming Star

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

disrespectful language? What disrespectful language?? ..! Look ^^^^ 😄

Seriously though - point taken: Sorry!

And yes! that function works a treat. Thank you!
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
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.