Adds a string s coded as the supported encoding to b

Returns the number of bytes written to s

Property definitions

core $ Codec :: add_string_to
	# Adds a string `s` coded as the supported encoding to `b`
	#
	# Returns the number of bytes written to `s`
	fun add_string_to(s: Text, b: Bytes): Int is abstract
lib/core/codecs/codec_base.nit:43,2--46,54

core $ UTF8Codec :: add_string_to
	redef fun add_string_to(s, b) do
		s.append_to_bytes(b)
		return s.byte_length
	end
lib/core/codecs/utf8.nit:49,2--52,4

core $ ISO88591Codec :: add_string_to
	redef fun add_string_to(s, b) do
		var pos = 0
		for i in s.chars do
			var cp = i.code_point
			if cp <= 255 then
				b[pos] = cp
			else
				b[pos] = 0x3F
			end
			pos += 1
		end
		return pos
	end
lib/core/codecs/iso8859_1.nit:48,2--60,4