CHPrettyUtil
class type string_printer_int = object ... end
val fixed_length_string :
?alignment:string_alignment_t ->
string ->
int ->
string
fixed_length_string alignment s n
returns a string of length n
that is padded with spaces according to the alignment alignment
if the length of s
is less than n
, otherwise returns s
val fixed_length_pretty :
?alignment:string_alignment_t ->
CHPretty.pretty_t ->
int ->
CHPretty.pretty_t
fixed_length_pretty alignment p n
returns a pretty_t object of length n
padded with spaces according to the alignment alignment
if the length of p
is less than n
, other wise returns the pretty_t object of the string representation of s
.
Note that in all cases the pretty_t object is converted to a string first.
fixed_length_int_string s n
returns a string of length n
that ends with s
padded with leading zeroes if the length of s
is less than n
, otherwise returns s
.
string_suffix s n
returns the suffix of s
that starts at the n'th character of s
(zero-based).
val list_to_pretty :
('a -> CHPretty.pretty_t) ->
CHPretty.pretty_t ->
'a list ->
CHPretty.pretty_t
val string_printer : string_printer_int
val pretty_to_string : CHPretty.pretty_t -> string
val pp_quantity : int -> ?numwidth:int -> string -> string -> CHPretty.pretty_t
val pp_list : < toPretty : CHPretty.pretty_t.. > list -> CHPretty.pretty_t
val pp_list_str : string list -> CHPretty.pretty_t
val pp_list_int : int list -> CHPretty.pretty_t
val pp_array : < toPretty : CHPretty.pretty_t.. > array -> CHPretty.pretty_t
val pp_array_int : int array -> CHPretty.pretty_t
val pp_array_big_int : Z.t array -> CHPretty.pretty_t
val pp_matrix_int : int array array -> CHPretty.pretty_t
val pp_matrix_big_int : Z.t array array -> CHPretty.pretty_t
val pp_stack :
< toPretty : CHPretty.pretty_t.. > Stdlib.Stack.t ->
CHPretty.pretty_t
val pp_assoc_int_int : (int * int) list -> CHPretty.pretty_t
val pp_assoc_int_big_int : (int * Z.t) list -> CHPretty.pretty_t