Closed tolysz closed 5 years ago
What is the best way of converting Haskell Strings into null terminated c strings i.e. char *?
Strings
c
strings
char *
I could add \0 and convert into bytestring and usre $bs-ptr:
\0
$bs-ptr:
Does withCString solve it for you?
withCString
Thanks, yes, it could work. Personally I like the anti-quoter approach for the marshalling.
What is the best way of converting Haskell
Strings
into null terminatedc
strings
i.e.char *
?I could add
\0
and convert into bytestring and usre$bs-ptr: