summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-24 22:01:12 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-24 22:01:12 -0800
commit14fd8b9e92ffe32275aba6f30dd8edf4531c6a19 (patch)
tree9dbf70b2c06ffa15da7930dd2259b021ed05d0ec /test
parent77a5bd52ac777a95a22395227f29084e49569370 (diff)
downloadmc-14fd8b9e92ffe32275aba6f30dd8edf4531c6a19.tar.gz
Land char iterators.
Diffstat (limited to 'test')
-rw-r--r--test/encodechar.myr4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/encodechar.myr b/test/encodechar.myr
index ca2ff76..ed1fda7 100644
--- a/test/encodechar.myr
+++ b/test/encodechar.myr
@@ -7,13 +7,11 @@ const main = {args : byte[:][:]
const chartypes = {
var s
- var c
var foo
var buf : byte[32]
s = "1世界äa\n"
- while s.len != 0
- (c, s) = std.striter(s)
+ for c in std.chariter(s)
foo = c
if std.encode(buf[:std.charlen(c)], c) == 0
std.write(1, "couldn't encode\n")