The number-length package

[ Tags: benchmark, bsd3, data, library ] [ Propose Tags ]

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

[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1
Change log ChangeLog.md
Dependencies base (>=4.5 && <5), tagged (>=0.6 && <0.9) [details]
License BSD3
Copyright (c) 2015-2016, Peter Trško
Author Peter Trško
Maintainer peter.trsko@gmail.com
Category Data
Home page https://github.com/trskop/number-length
Source repository head: git clone git://github.com/trskop/number-length.git
this: git clone git://github.com/trskop/number-length.git(tag v0.1.0.1)
Uploaded Wed Feb 10 21:32:06 UTC 2016 by PeterTrsko
Distributions NixOS:0.1.0.1
Downloads 153 total (7 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-02-12 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
pedantic

Pass additional warning flags to GHC.

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for number-length-0.1.0.1

[back to package description]

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.