Convert a String consisting of only characters in the ASCII block
to a byte sequence. Any character with a codepoint above U+007F is
replaced by U+0000.
Modulebyteslice-0.2.13.2Haskell2010
Data.Bytes.Text.Ascii
This module treats Bytes data as holding ASCII text. Providing bytes
outside the ASCII range (U+0000 -- U+007F) may cause a failure or
unspecified results, but such bytes will never be inspected.
For functions that can operate on ASCII-compatible encodings, see
Data.Bytes.Text.AsciiExt.
- 6 values
- Packagebyteslice-0.2.13.2
- Exports6
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceAscii.hs
Decode machine-sized word from decimal representation. Returns Nothing on overflow. Allows any number of leading zeros. Trailing non-digit bytes cause Nothing to be returned.
Is the byte sequence equal to the NUL-terminated C String?
The C string must be a constant.
Interpret byte sequence as ASCII codepoints.
Only available when building with text-2.0 and newer.
Returns Nothing if any of the bytes are outside of the
range 0x00-0x7F