class
Crowbar::Selectors::DelimitedField
- Crowbar::Selectors::DelimitedField
- Crowbar::Selector
- Reference
- Object
Overview
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.
Defined in:
crowbar/selectors/delimited_field.crConstructors
Instance Method Summary
- #delimiter : UInt8
- #field_index : Int32
- #handle_quotes? : Bool
- #line_delimited? : Bool
-
#select(buffer : Buffer) : Array(Tuple(Int32, Int32))
Returns an array of target ranges {start_index, end_index_exclusive}
Instance methods inherited from class Crowbar::Selector
&(other : Selector) : Selector
&,
|(other : Selector) : Selector
|,
~ : Selector
~,
select(buffer : Buffer) : Array(Tuple(Int32, Int32))
select,
weight : Float64
weight,
weight=(weight : Float64)
weight=
Constructor methods inherited from class Crowbar::Selector
new(weight : Float64 = 1.0)
new
Constructor Detail
def self.new(field_index : Int32, delimiter : UInt8 | Char | String = ',', line_delimited : Bool = true, handle_quotes : Bool = true, weight : Float64 = 1.0)
#
Instance Method Detail
Description copied from class Crowbar::Selector
Returns an array of target ranges {start_index, end_index_exclusive}