package textutils

  1. Overview
  2. Docs

This module is used for constructing lists of 'a ts from a record's fields. The intention is to use Fields.to_list to obtain a list.

val field : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> ?header:string -> ('field -> string) -> ('record, 'field) Core_kernel.Field.t -> 'record t

Create a column based on a field of a record.

val field_attr : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> ?header:string -> ('field -> Attr.t list * string) -> ('record, 'field) Core_kernel.Field.t -> 'record t

field_attr is to field as create_attr is to create.

val field_opt : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> ?header:string -> ('field -> string) -> ('record, 'field option) Core_kernel.Field.t -> 'record t

Like field, but defaults to "" if None

val field_opt_attr : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> ?header:string -> ('field -> Attr.t list * string) -> ('record, 'field option) Core_kernel.Field.t -> 'record t

Like field_attr, but defaults to ([], "") if None

OCaml

Innovation. Community. Security.