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

Fix unicode.split with seperators examples #17176

Merged
merged 9 commits into from
Feb 26, 2021
4 changes: 2 additions & 2 deletions lib/pure/unicode.nim
Original file line number Diff line number Diff line change
Expand Up @@ -971,14 +971,14 @@ iterator split*(s: string, seps: openArray[Rune] = unicodeSpaces,
## And the following code:
##
## .. code-block:: nim
## for word in split("this:is;an$example", {';', ':', '$'}):
## for word in split("this:is;an$example", ";:$".toRunes):
zetashift marked this conversation as resolved.
Show resolved Hide resolved
## writeLine(stdout, word)
##
## ...produces the same output as the first example. The code:
##
## .. code-block:: nim
## let date = "2012-11-20T22:08:08.398990"
## let separators = {' ', '-', ':', 'T'}
## let separators = " -:T".toRunes
## for number in split(date, separators):
## writeLine(stdout, number)
##
Expand Down