#byte-buffer #utf-8 #cstring #u8z #u8zz

asciiz

asciiz create buffer and copy bytes ends with 0u8

1 unstable release

0.1.4 May 6, 2023
0.1.3 May 6, 2023
0.1.2 May 6, 2023
0.1.1 May 6, 2023
0.1.0 May 6, 2023

#160 in FFI

Download history 24/week @ 2024-03-12 14/week @ 2024-03-19 22/week @ 2024-03-26 18/week @ 2024-04-02 8/week @ 2024-04-09 42/week @ 2024-04-16 64/week @ 2024-04-23 7/week @ 2024-04-30 36/week @ 2024-05-07 49/week @ 2024-05-14 36/week @ 2024-05-21 13/week @ 2024-05-28 14/week @ 2024-06-04 16/week @ 2024-06-11 15/week @ 2024-06-18 13/week @ 2024-06-25

62 downloads per month
Used in 9 crates (7 directly)

MIT license

7KB
120 lines

asciiz

asciiz Rust crate create buffer and copy bytes ends with 0u8

Examples

use asciiz::u8z::U8zBuf;

let mut m = U8zBuf::from_u8array(b"bytesarray"); // to keep lifetime
let r = unsafe { c_function_requires_asciiz_const(m.as_i8p()) };
let s = unsafe { c_function_requires_asciiz_not_const(m.as_i8p_mut()) };

Samples

see also

License

MIT License

No runtime deps