package delimited_parsing

  1. Overview
  2. Docs
exception Bad_csv_formatting of string list * string
val create_manual : ?strip:bool -> ?sep:char -> header:Header.t -> unit -> ([ `Data of string | `Eof ] -> Delimited_parsing__.Row.t list) Core.Staged.t

create_manual ?strip ~header r returns a function that allows you to feed strings into it, receiving back the rows as they are finished.

It is explicitly allowed to pass Eof, then more data. This is useful when tailing a file or when joining multiple files together.

val of_reader : ?strip:bool -> ?skip_lines:int -> ?sep:char -> header:Header.t -> Async.Reader.t -> Delimited_parsing__.Row.t Async.Pipe.Reader.t

of_reader ?strip ~header r returns a row pipe based on data read from the provided reader.

val create_reader : ?strip:bool -> ?skip_lines:int -> ?sep:char -> header:Header.t -> string -> Delimited_parsing__.Row.t Async.Pipe.Reader.t Async.Deferred.t

create_reader ?strip ~header filename same as of_reader, but creates the reader for you

val of_writer : ?sep:char -> ?line_breaks:[ `Unix | `Windows ] -> Async.Writer.t -> string list Async.Pipe.Writer.t
val create_writer : ?sep:char -> ?line_breaks:[ `Unix | `Windows ] -> string -> string list Async.Pipe.Writer.t Async.Deferred.t
val parse_string : ?strip:bool -> ?sep:char -> header:Header.t -> string -> Delimited_parsing__.Row.t list
OCaml

Innovation. Community. Security.