Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent String.Split results #101

Open
the-rayy opened this issue Dec 1, 2017 · 0 comments
Open

Inconsistent String.Split results #101

the-rayy opened this issue Dec 1, 2017 · 0 comments
Labels

Comments

@the-rayy
Copy link
Contributor

the-rayy commented Dec 1, 2017

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.

@MuniuDev MuniuDev added the bug label Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants