Mercurial > repos > rhope
comparison string.rhope @ 136:fc3815b7462f
Javascript backend now produces working code for some simple examples, still more of the standard lib that needs to be ported.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 14 Nov 2010 23:07:55 -0500 |
parents | 0a4682be2db2 |
children | d86df83402f3 |
comparison
equal
deleted
inserted
replaced
135:18a4403fe576 | 136:fc3815b7462f |
---|---|
90 { | 90 { |
91 [in]First | 91 [in]First |
92 { len <- Count UTF8[in, ~, 0i32] } | 92 { len <- Count UTF8[in, ~, 0i32] } |
93 { len <- 0i32 } | 93 { len <- 0i32 } |
94 out <- [[Build[String()]]Buffer <<[in]]Length <<[len] | 94 out <- [[Build[String()]]Buffer <<[in]]Length <<[len] |
95 } | |
96 | |
97 String@Empty Array[in:out(String)] | |
98 { | |
99 out <- "" | |
95 } | 100 } |
96 | 101 |
97 Print@String[string:out] | 102 Print@String[string:out] |
98 { | 103 { |
99 //TODO: Sanitize string (remove terminal escapes and replace invalid UTF) | 104 //TODO: Sanitize string (remove terminal escapes and replace invalid UTF) |