Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Validate that a byte sequence is UTF-8-encoded text. All of these functions return zero when the byte sequence is not UTF-8-encoded text, and they return an unspecified non-zero value when the byte sequence is UTF-8-encoded text.
Variants are provided for both ByteArray#
and Ptr
. Additionally,
variants are provided that use both the safe
and unsafe
FFI.
If compiling with SIMDUTF turned off, this module exports nothing.
Documentation
c_is_valid_utf8_bytearray_unsafe Source #
:: ByteArray# | Bytes |
-> CSize | Offset into bytes |
-> CSize | Length |
-> IO CInt |
c_is_valid_utf8_bytearray_safe Source #
:: ByteArray# | Bytes |
-> CSize | Offset into bytes |
-> CSize | Length |
-> IO CInt |