module Formatter:sig
..end
type
t = {
|
indent : |
(* |
Increase the indentation level.
| *) |
|
dedent : |
(* |
Decrease the indentation level.
| *) |
|
format_usage : |
(* |
Format usage string into style of this formatter.
| *) |
|
format_heading : |
(* |
Format heading into style of this formatter.
| *) |
|
format_description : |
(* |
Format description into style of this formatter.
| *) |
|
format_option : |
(* |
Format option into style of this formatter (see explanation below).
| *) |
format_option
has
signature format_option (snames,lnames) metavars help
, where
snames
is a list of the short option names, lnames
is a
list of the long option names, metavars
is a list of the
metavars the option takes as arguments, and help
is the help
string supplied by the user.val indented_formatter : ?level:int Pervasives.ref ->
?indent:int Pervasives.ref ->
?indent_increment:int ->
?max_help_position:int ->
?width:int -> ?short_first:bool -> unit -> t
level
: Reference to the current indentation level. Its
value reflects changes in indentation level.indent
: Reference to the current indentation amount. Its
value reflects changes in indentation level.indent_increment
: Number of columns to indent by when
more indentation is required.max_help_position
: Maximum starting column for the help
messages relating to each option.width
: Total with of the usage messages printed.short_first
: List all the short option names first?val titled_formatter : ?level:int Pervasives.ref ->
?indent:int Pervasives.ref ->
?indent_increment:int ->
?max_help_position:int ->
?width:int -> ?short_first:bool -> unit -> t
OptParse.Formatter.indented_formatter
for a description of
the options.val wrap : ?initial_indent:int -> ?subsequent_indent:int -> string -> int -> string list
wrap text width
reflows the given text paragraph into lines
of width at most width
(lines may exceed this if the are
single words that exceed this limit).initial_indent
: Indentation of the first line.subsequent_indent
: Indentation of the following lines.val fill : ?initial_indent:int -> ?subsequent_indent:int -> string -> int -> string