Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/trskop/number-length

Number length in decimal and hexadecimal representation.
https://github.com/trskop/number-length

Last synced: 10 days ago
JSON representation

Number length in decimal and hexadecimal representation.

Awesome Lists containing this project

README

        

# Number Length

[![Hackage](http://img.shields.io/hackage/v/number-length.svg)][Hackage: number-length]
[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/number-length.svg)](http://packdeps.haskellers.com/reverse/number-length)
[![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)][Haskell.org]
[![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)][tl;dr Legal: BSD3]

[![Build](https://travis-ci.org/trskop/number-length.svg)](https://travis-ci.org/trskop/number-length)
[![Coverage Status](https://coveralls.io/repos/github/trskop/number-length/badge.svg?branch=master)](https://coveralls.io/github/trskop/number-length?branch=master)

## 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.

[Hackage: number-length]:
http://hackage.haskell.org/package/number-length
"Package number-length on Hackage"
[Haskell.org]:
http://www.haskell.org
"The Haskell Programming Language"
[LICENSE]:
https://github.com/trskop/number-length/blob/master/LICENSE
"License of number-length package."
[tl;dr Legal: BSD3]:
https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29
"BSD 3-Clause License (Revised)"