Load from the specified stream.

Parameters:

  • stream: Input stream.
  • has_header: Is the first record the header? - defaults to true
  • skip_empty: Do we skip the empty lines? - defaults to true

Property definitions

csv $ CsvDocument :: load_from
	# Load from the specified stream.
	#
	# Parameters:
	#
	# * `stream`: Input stream.
	# * `has_header`: Is the first record the header? - defaults to true
	# * `skip_empty`: Do we skip the empty lines? - defaults to true
	fun load_from(stream: Reader, has_header: nullable Bool, skip_empty: nullable Bool) do
		if has_header == null then has_header = true
		if skip_empty == null then skip_empty = true
		var reader = new CsvReader(stream)
		reader.separator = separator
		reader.eol = eol
		reader.delimiter = delimiter
		reader.skip_empty = skip_empty
	end
lib/csv/csv.nit:149,2--164,4