Returns a mutable copy of self's bytes

assert "String".to_bytes isa Bytes
assert "String".to_bytes == [83, 116, 114, 105, 110, 103]

Property definitions

core :: bytes $ Text :: to_bytes
	# Returns a mutable copy of `self`'s bytes
	#
	# ~~~nit
	# assert "String".to_bytes isa Bytes
	# assert "String".to_bytes == [83, 116, 114, 105, 110, 103]
	# ~~~
	fun to_bytes: Bytes do
		var b = new Bytes.with_capacity(byte_length)
		append_to_bytes b
		return b
	end
lib/core/bytes.nit:793,2--803,4