Module Line.Delim


module Delim: sig .. end
Line structure to represent records with delimited fields. For example, this may be appropriate for generic comma- or tab-delimited data.

val fields : < delim : < .. >; .. > Line.t -> string array
The fields of a delimited data record (accessor, required, default = [| |])
val set_fields : string array -> (< delim : < .. >; .. > as 'a) Line.t -> 'a Line.t
Updater for Line.Delim.fields
val names : < delim : < names : Line.present; .. >; .. > Line.t -> string list
The names of the fields, in order. This is used by Line.Delim.get (accessor, nullable)
val set_names : string list ->
< delim : < names : 'a; options : 'b >; fstab : 'c; group : 'd;
key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h; seq : 'i; source : 'j;
stat : 'k >
Line.t ->
< delim : < names : Line.present; options : 'b >; fstab : 'c; group : 'd;
key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h; seq : 'i; source : 'j;
stat : 'k >
Line.t
Updater for Line.Delim.names
val get : string -> < delim : < names : Line.present; .. >; .. > Line.t -> string
val get_int : string -> < delim : < names : Line.present; .. >; .. > Line.t -> int
val get_float : string -> < delim : < names : Line.present; .. >; .. > Line.t -> float
val options : < delim : < options : Line.present; .. >; .. > Line.t -> Delimited.options
The Delimited options with which the record was split (accessor, nullable)
val set_options : Delimited.options ->
< delim : < names : 'a; options : 'b >; fstab : 'c; group : 'd;
key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h; seq : 'i; source : 'j;
stat : 'k >
Line.t ->
< delim : < names : 'a; options : Line.present >; fstab : 'c; group : 'd;
key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h; seq : 'i; source : 'j;
stat : 'k >
Line.t
Updater for Line.Delim.options
val output : Pervasives.out_channel ->
< delim : < options : Line.present; .. >; .. > Line.t -> unit
Output a delimited text file record using the stored Delimited.options.
val create : fields:string array ->
< delim : Line.absent; fstab : 'a; group : 'b; key_value : 'c; mailcap : 'd;
passwd : 'e; ps : 'f; seq : 'g; source : 'h; stat : 'i >
Line.t ->
< delim : < names : Line.absent; options : Line.absent >; fstab : 'a;
group : 'b; key_value : 'c; mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g;
source : 'h; stat : 'i >
Line.t
Add the Line.Delim substructure to a line.