fun string_instance(txt: String): Instance
do
var nat = native_string_instance(txt)
- var res = self.send(self.force_get_primitive_method("to_s_with_length", nat.mtype), [nat, self.int_instance(txt.bytelen)])
+ 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)])
assert res != null
return res
end
else if pname == "atoi" then
return v.int_instance(recvval.atoi)
else if pname == "fast_cstring" then
- var ns = recvval.to_s.substring_from(args[1].to_i)
- return v.native_string_instance(ns)
+ var ns = recvval.fast_cstring(args[1].to_i)
+ return v.native_string_instance(ns.to_s)
end
else if pname == "calloc_string" then
return v.native_string_instance_len(args[1].to_i)