Forum Discussion

georgejecook's avatar
georgejecook
Streaming Star
8 years ago

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

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

anyone got a workaround?

3 Replies

Replies have been turned off for this discussion
  • 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
  • RokuKC's avatar
    RokuKC
    Roku Employee
    "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?
  • disrespectful language? What disrespectful language?? ..! Look ^^^^ 😄

    Seriously though - point taken: Sorry!

    And yes! that function works a treat. Thank you!