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()}")
}Вывод
5
pub(api) data CStringС версии. 1.0.0-beta
Методы
asPtr | () -> *u8Pointer to the first byte; valid while the CString is alive. |
len | () -> usizeLength without the terminating NUL. |
Определено в: std/ffi/ffi.oxl:34