pub(crate) const fn const_cstr_from_bytes(bytes: &'static [u8]) -> &'static CStr
Expand description

Creates a C string wrapper from a byte slice, in a constant context.

This is a utility function used by the ansi_str macro.

Panics

Panics if the slice is not null terminated or contains nulls, except as the last item