Http.Digits
Decimal digits codec.
These represent non-negative integers. The module detects overflows and turns them into errors.
val decode : string -> (int, string) Stdlib.result
decode s is the non-empty sequence of decimal digits s as a non-negative integer.
decode s
s
val encode : int -> string
encode_digits n is the non-negative integer n as a sequence of decimal digits.
encode_digits n
n
Invalid_argument
if n is negative.