License | BSD-style |
---|---|
Maintainer | Haskell Foundation |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
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 #
Opaque packed array of characters in the ASCII encoding
Instances
newtype MutableAsciiString st #
Binary conversion
fromBytesUnsafe :: UArray Word8 -> AsciiString #
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