lib/core: Renamed `Text::bytelen` to `Text::byte_length`
[nit.git] / src / interpreter / naive_interpreter.nit
index 539fb89..a9426c4 100644 (file)
@@ -319,10 +319,10 @@ class NaiveInterpreter
        # Return a new native string initialized with `txt`
        fun native_string_instance(txt: String): Instance
        do
-               var instance = native_string_instance_len(txt.bytelen+1)
+               var instance = native_string_instance_len(txt.byte_length+1)
                var val = instance.val
-               val[txt.bytelen] = 0u8
-               txt.to_cstring.copy_to(val, txt.bytelen, 0, 0)
+               val[txt.byte_length] = 0u8
+               txt.to_cstring.copy_to(val, txt.byte_length, 0, 0)
 
                return instance
        end
@@ -352,7 +352,7 @@ class NaiveInterpreter
        fun string_instance(txt: String): Instance
        do
                var nat = native_string_instance(txt)
-               var res = self.send(self.force_get_primitive_method("to_s_full", nat.mtype), [nat, self.int_instance(txt.bytelen), self.int_instance(txt.length)])
+               var res = self.send(self.force_get_primitive_method("to_s_full", nat.mtype), [nat, self.int_instance(txt.byte_length), self.int_instance(txt.length)])
                assert res != null
                return res
        end