tysv

Types

pub type Builder(a) {
  Builder(
    col_sep: String,
    row_sep: String,
    f: fn(String) -> Result(#(a, String), String),
  )
}

Constructors

  • Builder(
      col_sep: String,
      row_sep: String,
      f: fn(String) -> Result(#(a, String), String),
    )

Values

pub fn build(
  builder: Builder(a),
  text: String,
) -> Result(List(a), String)
pub fn col(
  builder: Builder(fn(a) -> b),
  parse: fn(String) -> Result(a, Nil),
) -> Builder(b)
pub fn col_sep(
  builder: Builder(a),
  col_sep: String,
) -> Builder(a)

Set column separator. NOTE: This function must be called before any col in the pipeline.

pub fn init(f: fn(a) -> b) -> Builder(fn(a) -> b)
pub fn parsed(f: fn(a) -> b) -> fn(a) -> b
pub fn row_sep(
  builder: Builder(a),
  row_sep: String,
) -> Builder(a)

Set row separator.

Search Document