License | BSD-style |
---|---|
Maintainer | Haskell Foundation |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A AsciiString type backed by a ASCII
encoded byte array and all the necessary
functions to manipulate the string.
Synopsis
- newtype AsciiString = AsciiString {}
- newtype MutableAsciiString st = MutableAsciiString (MUArray Char7 st)
- fromBytesUnsafe :: UArray Word8 -> AsciiString
- fromBytes :: UArray Word8 -> Maybe AsciiString
Documentation
newtype AsciiString Source #
Opaque packed array of characters in the ASCII encoding
Instances
newtype MutableAsciiString st Source #
Binary conversion
fromBytesUnsafe :: UArray Word8 -> AsciiString Source #
Convert a Byte Array representing ASCII data directly to an AsciiString without checking for ASCII validity
If the input contains invalid Char7 value (anything above 0x7f), it will trigger runtime async errors when processing data.
In doubt, use fromBytes