data CString
Owned, NUL-terminated copy of a str for passing to C (const char *).
Example:
use std.ffi { CString }
fn main() io {
let c: CString = "hello".toCString()
print("{c.len()}")
}Output
5
pub(api) data CStringSince. 1.0.0-beta
Methods
asPtr | () -> *u8Pointer to the first byte; valid while the CString is alive. |
len | () -> usizeLength without the terminating NUL. |
Defined in: std/ffi/ffi.oxl:34