core :: Writable :: write_to_string
write_to
but return a new String (may be quite large).This functionality is anecdotal, since the point of a streamable object is to be efficiently written to a stream without having to allocate and concatenate strings.
# Like `write_to` but return a new String (may be quite large).
#
# This functionality is anecdotal, since the point
# of a streamable object is to be efficiently written to a
# stream without having to allocate and concatenate strings.
fun write_to_string: String
do
var stream = new StringWriter
write_to(stream)
return stream.to_s
end
lib/core/stream.nit:558,2--568,4
redef fun write_to_string do return to_s
lib/core/stream.nit:590,2--41