diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2010-03-03 16:58:33 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2010-03-03 16:58:33 +0100 |
commit | 048811b2be4ac05415e0ef67777dfd297f7be4d6 (patch) | |
tree | 474ac42ceafbeee6a428c4ef35dd45fc9f217472 /lib/pure/strutils.nim | |
parent | 6c08ba8290d8ddebbbf3b327401a6e3087c07188 (diff) | |
download | Nim-048811b2be4ac05415e0ef67777dfd297f7be4d6.tar.gz |
fixed graphics module
Diffstat (limited to 'lib/pure/strutils.nim')
-rwxr-xr-x | lib/pure/strutils.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 724d00ee9..6459cfbd7 100755 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -162,11 +162,15 @@ iterator split*(s: string, seps: set[char] = Whitespace): string = ## produces the same output. var last = 0 assert(not ('\0' in seps)) + #echo "cam here 1", s while last < len(s): while s[last] in seps: inc(last) var first = last + #echo "A first: ", first, " last: ", last while last < len(s) and s[last] not_in seps: inc(last) # BUGFIX! + #echo "B first: ", first, " last: ", last if first <= last-1: + echo copy(s, first, last-1) yield copy(s, first, last-1) iterator split*(s: string, sep: char): string = |