Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
decodeUtf8' :: ByteString -> Either UnicodeException Textprotolude Protolude Decode a ByteString containing UTF-8 encoded text. If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf8With :: OnDecodeError -> ByteString -> Textprotolude Protolude Decode a ByteString containing UTF-8 encoded text. Surrogate code points in replacement character returned by OnDecodeError will be automatically remapped to the replacement char U+FFFD.
decodeUtf8ByteArray :: Decoder s ByteArraycborg Codec.CBOR.Decoding Decode a textual string as UTF-8 encoded ByteArray. Note that the result is not validated to be well-formed UTF-8. Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the ByteArray is live but not forced.
decodeUtf8ByteArrayCanonical :: Decoder s ByteArraycborg Codec.CBOR.Decoding Decode canonical representation of a textual string as UTF-8 encoded ByteArray. Note that the result is not validated to be well-formed UTF-8. Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the ByteArray is live but not forced.
decodeUtf8EmbedErrors :: String -> [Either String Char]hxt-unicode Data.String.UTF8Decoding No documentation available.
decodeUtf8IgnoreErrors :: String -> Stringhxt-unicode Data.String.UTF8Decoding No documentation available.
decodeUtf8Bytes :: Bytes -> Maybe IPip Net.IP Decode UTF-8-encoded Bytes into an IP address.
decodeUtf8Bytes :: Bytes -> Maybe IPv4ip Net.IPv4 Decode UTF-8-encoded Bytes into an IPv4 address.
>>> IPv4.decodeUtf8Bytes (Ascii.fromString "127.0.0.1") Just (ipv4 127 0 0 1)
decodeUtf8Bytes :: Bytes -> Maybe IPv6ip Net.IPv6 Decode UTF-8-encoded Bytes into an IPv6 address.
>>> decodeUtf8Bytes (Ascii.fromString "::cab:1") Just (ipv6 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0cab 0x0001)
decodeUtf8Bytes :: Bytes -> Maybe Macip Net.Mac Lenient decoding of MAC address. This is case insensitive and allows either : or - as the separator. It also allows leading zeroes to be missing.
>>> Mac.decodeUtf8Bytes (Ascii.fromString "A2:DE:AD:BE:EF:67") Just (mac 0xa2deadbeef67) >>> Mac.decodeUtf8Bytes (Ascii.fromString "13-a2-FE-A4-17-96") Just (mac 0x13a2fea41796)