Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- fromString :: String -> Bytes
- decodeDecWord :: Bytes -> Maybe Word
- equalsCStringCaseInsensitive :: CString -> Bytes -> Bool
- toShortText :: Bytes -> Maybe ShortText
- toShortTextU :: ByteArray -> Maybe ShortText
Documentation
fromString :: String -> Bytes Source #
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
.
decodeDecWord :: Bytes -> Maybe Word Source #
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.