package opam-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
Querying information
val visual_length : string -> int

Returns the length of the string in terminal chars, ignoring ANSI color sequences from OpamConsole.colorise

Text formatting functions
val indent_left : string -> ?visual:string -> int -> string

left indenting. ~visual can be used to indent eg. ANSI colored strings and should correspond to the visible characters of s

val indent_right : string -> ?visual:string -> int -> string
val align_table : string list list -> string list list

Pads fields in a table with spaces for alignment.

val reformat : ?start_column:int -> ?indent:int -> string -> string

Cut long lines in string according to the terminal width

val itemize : ?bullet:string -> ('a -> string) -> 'a list -> string

Convert a list of items to string as a dashed list

val pretty_list : ?last:string -> string list -> string

Display a pretty list: "x";"y";"z" -> "x, y and z". "and" can be changed by specifying last

Printing
val print_table : out_channel -> sep:string -> string list list -> unit

Prints a table

OCaml

Innovation. Community. Security.