| Copyright | (c) 2011 MailRank Inc. |
|---|---|
| License | BSD |
| Maintainer | bos@serpentine.com |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
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
- decode :: ByteString -> (ByteString, ByteString)
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")