Import std.ffi.cstring
std.ffi.cstring
What a CString does besides ToString, which is built in: a copy of a String that C code can keep, its length, and giving the copy back. The copy is the runtime's, like the one an Extern Function's call makes of a String argument, so leak reports count one that's never freed.
std/ffi/cstring.fb
Extends
CString
extend
Extend CString
No doc comment.
-
A CString of
text's UTF-8 bytes and a NUL, in memory of its own, which C code can keep until Free gives it back. C reads it up to its first NUL, so a NUL intextends it there. -
How many bytes it has before its first NUL. Panics when it's Null.
-
Gives back what From made, and nothing else, which panics. Null is nothing to give back.
Report an issue with this page or with FutureBlitz on GitHub.