@hackage number-length0.1.0.1

Number of digits in a number in decimal and hexadecimal representation.

Number Length

Hackage Hackage Dependencies Haskell Programming Language BSD3 License

Build Coverage Status

Description

Number length in decimal and hexadecimal representation.

There are situations when it is necessary to know the length of a number in decimal or hexadecimal form. In example when allocating buffer while serializing a number in to binary or human readable format.

λ> numberLength (123 :: Int)
3

λ> numberLengthHex (123 :: Int)  -- 123 = 7b in hex
2

Building Options

  • -fpedantic (disabled by default)

    Pass additional warning flags to GHC.

License

The BSD 3-Clause License, see LICENSE file for details.

Contributions

Contributions, pull requests and bug reports are welcome! Please don't be afraid to contact author using GitHub or by e-mail.