lathe-0.1.0.0: Pure incremental byte parser.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parser.Lathe.Radix

Description

Conversions from individual bytes to numbers in specific formats.

Synopsis

Documentation

Base-2

bin :: Word8 -> Maybe Word8 Source #

Convert a binary ASCII byte into a number.

Base-8

oct :: Word8 -> Maybe Word8 Source #

Convert an octal ASCII byte into a number.

Base-10

dec :: Word8 -> Maybe Word8 Source #

Convert a decimal ASCII byte into a number.

Base-16

hex :: Word8 -> Maybe Word8 Source #

Convert a hexadecimal ASCII byte into a number. Case-insensitive.

hexUpper :: Word8 -> Maybe Word8 Source #

Convert an upper-case hexadecimal ASCII byte into a number.

hexLower :: Word8 -> Maybe Word8 Source #

Convert a lower-case hexadecimal ASCII byte into a number.