-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Proposed solution for issue #8919 #9280
Conversation
why not throw an exception (eg: |
This should instead use |
I agree with @Araq it should fail instead of silently accepting nonsensical inputs; I just tried, |
This was discussed and we choose this implemementation because Python/JS/whatever also does it this way. |
So, it should use |
Exactly. |
👍 done |
* Proposed solution for issue nim-lang#8919 * count sub/subs must be non-empty
* Proposed solution for issue nim-lang#8919 * count sub/subs must be non-empty
* Proposed solution for issue nim-lang#8919 * count sub/subs must be non-empty
Returns
s.len + 1
when substringsub
is empty, as proposed in the issue discussion.