bugfix: macro evaluation; added colors.extractRGB

This commit is contained in:
Andreas Rumpf 2010-03-04 23:42:19 +01:00
commit f45a2f23b0
8 changed files with 190 additions and 154 deletions

View file

@ -162,15 +162,11 @@ 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 =