The number-length package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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

Versions0.1.0.0, 0.1.0.1, 0.1.0.1
Change logChangeLog.md
Dependenciesbase (>=4.5 && <5), tagged (>=0.6 && <0.9) [details]
LicenseBSD3
Copyright(c) 2015-2016, Peter Trško
AuthorPeter Trško
Maintainerpeter.trsko@gmail.com
CategoryData
Home pagehttps://github.com/trskop/number-length
Source repositoryhead: git clone git://github.com/trskop/number-length.git
this: git clone git://github.com/trskop/number-length.git(tag v0.1.0.1)
UploadedWed Feb 10 21:30:18 UTC 2016 by PeterTrsko

Modules

[Index]

Flags

NameDescriptionDefaultType
pedanticPass additional warning flags to GHC.DisabledManual

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

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for number-length-0.1.0.1

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

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.