class

CSV2::Reader

Inherits Reference < Object

CSV reader with an API matching Crystal's stdlib CSV module.

Constants

DEFAULT_QUOTE_CHAR = '"'
DEFAULT_SEPARATOR = ','

Constructors

new(string_or_io : String | IO, headers : Bool = false, strip : Bool = false, separator : Char = DEFAULT_SEPARATOR, quote_char : Char = DEFAULT_QUOTE_CHAR)
Source
new(string_or_io : String | IO, headers = false, strip = false, separator : Char = DEFAULT_SEPARATOR, quote_char : Char = DEFAULT_QUOTE_CHAR, &)
Source

Class methods

each_row(string_or_io : String | IO, separator : Char = DEFAULT_SEPARATOR, quote_char : Char = DEFAULT_QUOTE_CHAR, &)
Source
each_row(string_or_io : String | IO, separator : Char = DEFAULT_SEPARATOR, quote_char : Char = DEFAULT_QUOTE_CHAR) : Iterator(Array(String))
Source
parse(string_or_io : String | IO, separator : Char = DEFAULT_SEPARATOR, quote_char : Char = DEFAULT_QUOTE_CHAR) : Array(Array(String))
Source

Instance methods

[](header : String) : String
Source
[](column : Int) : String
Source
[](header_pattern : Regex, *, options : Regex::MatchOptions = Regex::MatchOptions::None) : String
Source
[]?(header : String) : String | Nil
Source
[]?(column : Int) : String | Nil
Source
[]?(header_pattern : Regex, *, options : Regex::MatchOptions = Regex::MatchOptions::None) : String | Nil
Source
each
Source
headers
Source
headers?
Source
indices
Source
next
Source
rewind
Source
strip?
Source
values_at(*columns : Int)
Source
values_at(*headers : String)
Source

Nested types