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.

Property definitions

core $ Writable :: write_to_string
	# 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

core :: stream $ Bytes :: write_to_string
	redef fun write_to_string do return to_s
lib/core/stream.nit:590,2--41