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

1 array element missed #11

Merged
merged 1 commit into from
Jun 14, 2017
Merged

1 array element missed #11

merged 1 commit into from
Jun 14, 2017

Conversation

Dexaran
Copy link
Contributor

@Dexaran Dexaran commented May 29, 2017

In this example
var s = "www.google.com".toSlice();
var delim = ".".toSlice();
var parts = new string[](s.count(delim) + 1);

parts should contain three elements www / google / com but there are only two dots in www.google.com string.
(count + 1) is required instead of (count) if we want all three parts of the string to be in parts array.

In this example
`var s = "www.google.com".toSlice();`
`    var delim = ".".toSlice();`
`    var parts = new string[](s.count(delim) + 1);`

parts should contain three elements `www` / `google` / `com` but there are only two dots in `www.google.com` string.
(count + 1) is required instead of (count) if we want all three parts of the string to be in `parts` array.
@Arachnid
Copy link
Owner

Thanks!

@Arachnid Arachnid merged commit 4a06920 into Arachnid:master Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants