Property definitions

core $ StringReader :: defaultinit
# `Stream` reading from a `String` source
#
# This class has the same behavior as `BytesReader`
# except for its constructor accepting a `String`.
#
# ~~~
# var reader = new StringReader("a…b")
# assert reader.read_char == 'a'
# assert reader.read_byte == 0xE2 # 1st byte of '…'
# assert reader.read_byte == 0x80 # 2nd byte of '…'
# assert reader.read_char == '�' # Reads the last byte as an invalid char
# assert reader.read_all == "b"
# ~~~
class StringReader
	super BytesReader

	autoinit source

	# Source data to read
	var source: String

	init do bytes = source.to_bytes

	redef fun close
	do
		source = ""
		super
	end
end
lib/core/stream.nit:742,1--770,3