package dolmen

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dolmen_std.MiscSource

Misc functions

Sourceval get_extension : string -> string

Returns the extension of a file, i.e the shortest suffix containing the character '.'. Returns an empty string if such a suffix does not exists.

Sourceval replicate : int -> 'a -> 'a list

Returns a list with n times the given value. Returns an empty list if n

Printing helpers

Sourceval pp_opt : ?none:string -> (Buffer.t -> 'a -> unit) -> Buffer.t -> 'a option -> unit

Print an option

Sourceval pp_list : pp_sep:(Buffer.t -> 'a -> unit) -> sep:'a -> pp:(Buffer.t -> 'b -> unit) -> Buffer.t -> 'b list -> unit

Print a list with separator into a buffer

Sourceval print_opt : ?none:string -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a option -> unit

Print an option.

Sourceval print_list : print_sep:(Format.formatter -> 'a -> unit) -> sep:'a -> print:(Format.formatter -> 'b -> unit) -> Format.formatter -> 'b list -> unit

Print a list with separator into a buffer

OCaml

Innovation. Community. Security.