package core

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

Module Byte_units.ShortSource

Sourcetype nonrec t = t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval to_string : t -> Base.String.t

Short.to_string is like to_string_hum but will attempt to only show 4 significant digits.

For example Byte_units.to_string_hum (Byte_units.of_bytes_int 1000) gives 1000B, but Byte_units.to_string_hum (Byte_units.of_bytes_int 1500) gives 1.46K.

Short.sexp_of_t does the same.

OCaml

Innovation. Community. Security.