Crates.io | zstr |
lib.rs | zstr |
version | 0.1.1 |
source | src |
created_at | 2021-04-13 10:08:02.053569 |
updated_at | 2022-04-27 06:57:12.908834 |
description | Zero-terminated C string literals |
homepage | |
repository | https://github.com/H2CO3/zstr/ |
max_upload_size | |
id | 382808 |
size | 6,304 |
zstr!
: Zero-terminated C string literalsThis crate provides a minimal, safe, zero-cost function-like procedural
macro, zstr!()
, that creates 0-terminated &'static CStr
values from
regular Rust string (or byte string) literals.
The basic usage is:
let c_str = zstr!("Hello World!");
See the documentation for more examples.