cardano-prelude-0.1.0.0: A Prelude replacement for the Cardano project
Copyright(c) 2011 MailRank Inc.
LicenseBSD
Maintainerbos@serpentine.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Cardano.Prelude.Base16.Internal

Description

Fast and efficient encoding and decoding of base16-encoded strings.

This code is lifted directly from https://hackage.haskell.org/package/base16-bytestring-0.1.1.7/docs/src/Data.ByteString.Base16.html and is intended to be temporary to facilitate migration from base16-bytestring-0.1.1.7 to base16-bytestring-1.0.0.0

Synopsis

Documentation

decode :: ByteString -> (ByteString, ByteString) Source #

Decode a string from base16 form. The first element of the returned tuple contains the decoded data. The second element starts at the first invalid base16 sequence in the original string.

Examples:

decode "666f6f"  == ("foo", "")
decode "66quux"  == ("f", "quux")
decode "666quux" == ("f", "6quux")