mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
feat(CCInt): add of_float
This commit is contained in:
parent
2d1ba8d925
commit
9d083df3a6
2 changed files with 9 additions and 0 deletions
|
|
@ -211,6 +211,12 @@ let of_string s =
|
|||
|
||||
let of_string_exn = Stdlib.int_of_string
|
||||
|
||||
let of_float = int_of_float
|
||||
|
||||
(*$=
|
||||
1 (of_float 1.2)
|
||||
*)
|
||||
|
||||
type output = char -> unit
|
||||
|
||||
(* abstract printer *)
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ val of_string_exn : string -> t
|
|||
@raise Failure in case of failure.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val of_float : float -> t
|
||||
(** @since NEXT_RELEASE *)
|
||||
|
||||
val pp_binary : t printer
|
||||
(** Print as "0b00101010".
|
||||
@since 0.20 *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue