core :: Codec :: encode_string
s
to the format of self
# Transforms `s` to the format of `self`
fun encode_string(s: Text): Bytes is abstract
lib/core/codecs/codec_base.nit:40,2--41,46
redef fun encode_string(s) do
var buf = new Bytes.with_capacity(s.byte_length)
add_string_to(s, buf)
return buf
end
lib/core/codecs/utf8.nit:43,2--47,4
redef fun encode_string(s) do
var ns = new Bytes.with_capacity(s.byte_length)
add_string_to(s, ns)
return ns
end
lib/core/codecs/iso8859_1.nit:42,2--46,4