X-Git-Url: http://nitlanguage.org diff --git a/tests/example_procedural_string.nit b/tests/example_procedural_string.nit index 069ed21..a53669d 100644 --- a/tests/example_procedural_string.nit +++ b/tests/example_procedural_string.nit @@ -18,10 +18,10 @@ fun first_word(s: String): String do - var result = new Buffer + var result: Buffer = new FlatBuffer var i = 0 - while i < s.length and s[i] != ' ' do - result.add(s[i]) + while i < s.length and s.chars[i] != ' ' do + result.add(s.chars[i]) i = i + 1 end return result.to_s