feat(CCInt): add of_string_exn

This commit is contained in:
Fardale 2020-01-18 15:57:55 +01:00
parent c1b976d0d3
commit 2d1ba8d925
2 changed files with 7 additions and 0 deletions

View file

@ -209,6 +209,8 @@ let of_string s =
(Some 42) (of_string "42")
*)
let of_string_exn = Stdlib.int_of_string
type output = char -> unit
(* abstract printer *)

View file

@ -53,6 +53,11 @@ val to_string : t -> string
val of_string : string -> t option
(** @since 0.13 *)
val of_string_exn : string -> t
(** Alias to {!int_of_string}.
@raise Failure in case of failure.
@since NEXT_RELEASE *)
val pp_binary : t printer
(** Print as "0b00101010".
@since 0.20 *)