CString -package:haskell-gi-base
A C string is a reference to an array of C characters terminated by
NUL.
GHC C strings definitions (previously in GHC.Base). Use GHC.Exts from
the base package instead of importing this module directly.
bool is whether whitespace is significant
A null-terminated ASCII encoded
CString. Null characters are
not representable.
Create a builder from a
NUL-terminated
CString. This
ignores any textual encoding, copying bytes until
NUL is
reached.
Consume input matching the NUL-terminated C String.
A function that renders a c-like string with escaped characters. Note
that although it's called cstring, this can be used with most (all)
backend as they seem to mostly share escaping conventions. The c in
the name is barely an homage for C being the oldest language in the
lot.
>>> cstring "foobar"
"foobar"
>>> cstring "foobar\""
"foobar\""
A string with explicit length information in bytes instead of a
terminating NUL (allowing NUL characters in the middle of the string).
Compute the length of a NUL-terminated string. This address must refer
to immutable memory. GHC includes a built-in rule for constant folding
when the argument is a statically-known literal. That is, a
core-to-core pass reduces the expression cstringLength#
"hello"# to the constant 5#.
A null-terminated UTF-8 encoded
CString. Null characters can be
encoded as
0xc0 0x80.
Create a builder from a C string with explicit length. The builder
must be executed before the C string is freed.