kellyethridge / VBCorLib

The VBCorLib framework brings many of the powerful .NET classes to VB6.
http://www.kellyethridge.com/vbcorlib/
MIT License
112 stars 28 forks source link

CorString.Split with RemoveEmptyEntries fails with multiple contiguous separators #53

Closed kellyethridge closed 3 years ago

kellyethridge commented 4 years ago

When using RemoveEmptyEntries finding a separated repeated will fail.

    Const Sentence As String = "  word  word"

    Dim Words() As String
    Dim Word As Variant

    Words = CorString.Split(Sentence, " ", Options:=RemoveEmptyEntries)

    For Each Word In Words
        Debug.Print CorString.Format("'{0}'", Word)
    Next

This should produce the following array ("word", "word"). Instead, it returns ("","word word").