class

Crowbar::Selectors::DelimitedField

Inherits Crowbar::Selector < Reference < Object

Selects the N-th field or column delimited by a separator (e.g. CSV column, passwd line). Supports per-record (line-by-line) evaluation or global streaming evaluation.

Constructors

new(field_index : Int32, delimiter : UInt8 | Char | String = ',', line_delimited : Bool = true, handle_quotes : Bool = true, weight : Float64 = 1.0)
Source

Instance methods

delimiter
Source
field_index
Source
handle_quotes?
Source
line_delimited?
Source
select(buffer : Buffer) : Array(Tuple(Int32, Int32))

Returns an array of target ranges {start_index, end_index_exclusive}

Source