const-c-str

Crates.ioconst-c-str
lib.rsconst-c-str
version0.1.1
sourcesrc
created_at2019-03-05 21:37:41.224888
updated_at2019-03-06 20:54:57.16718
descriptionSafely create &CStr at compile time
homepage
repositoryhttps://github.com/regiontog/const-c-str
max_upload_size
id118961
size2,360
Erlend Tobiassen (regiontog)

documentation

https://docs.rs/const-c-str/0.1.0/const_c_str/

README

Crates.io api

const-c-str

Safely create &CStr at compile time checked with from_bytes_with_nul

Examples

use const_c_str::c_str;

#[cfg(feature = "const_cstr_unchecked")]
const greeting: &std::ffi::CStr = c_str!("Hello World!");
Commit count: 12

cargo fmt