mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
feat(CCInt): add of_string_exn
This commit is contained in:
parent
c1b976d0d3
commit
2d1ba8d925
2 changed files with 7 additions and 0 deletions
|
|
@ -209,6 +209,8 @@ let of_string s =
|
||||||
(Some 42) (of_string "42")
|
(Some 42) (of_string "42")
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
let of_string_exn = Stdlib.int_of_string
|
||||||
|
|
||||||
type output = char -> unit
|
type output = char -> unit
|
||||||
|
|
||||||
(* abstract printer *)
|
(* abstract printer *)
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,11 @@ val to_string : t -> string
|
||||||
val of_string : string -> t option
|
val of_string : string -> t option
|
||||||
(** @since 0.13 *)
|
(** @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
|
val pp_binary : t printer
|
||||||
(** Print as "0b00101010".
|
(** Print as "0b00101010".
|
||||||
@since 0.20 *)
|
@since 0.20 *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue