diff options
Diffstat (limited to 'lib/pure')
-rwxr-xr-x | lib/pure/strutils.nim | 4 | ||||
-rwxr-xr-x | lib/pure/xmlgen.nim | 1 |
2 files changed, 5 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 = diff --git a/lib/pure/xmlgen.nim b/lib/pure/xmlgen.nim index 29f2700f2..b69a15add 100755 --- a/lib/pure/xmlgen.nim +++ b/lib/pure/xmlgen.nim @@ -58,6 +58,7 @@ proc xmlCheckedTag*(e: PNimrodNode, tag: string, # will be modified, so that each attribute is only given one value var req = split(reqAttr) var opt = split(optAttr) + echo "##", optAttr, "##", opt.len result = newNimNode(nnkBracket, e) result.add(newStrLitNode("<")) result.add(newStrLitNode(tag)) |