Skip to content

Inconsistent String.Split results #101

Description

@the-rayy

String.Split gives inconsistent results. For example:

String s1 = String("|aa");  
String s2 = String("aa|");
String s3 = String("a||a");
String d = String("|");
REQUIRE(s1.Split(d).GetSize() == 2);
REQUIRE(s2.Split(d).GetSize() == 2);
REQUIRE(s3.Split(d).GetSize() == 3);

Splitting s1 returns Dynarray with size of 2 (empty string and "aa"), whilie splitting s2 gives Dynarray with only 1 String inside ("aa") and the test fails. IMO this should also contain blank String.

s3.Split also returns 3 values ("a", blank, "a") as expected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions