/cstr8

string types that are both valid UTF-8 and nul-terminated

Primary LanguageRustApache License 2.0Apache-2.0

Guaranteed valid nul-terminated UTF-8 C strings.

Latest version Documentation License MSRV


If there's some functionality you need which std's str or CStr provide but CStr8 doesn't, or similarly with CString and CString8, please open an issue; lack of feature parity is considered a bug.

The name is derived from analogy with C++'s std::char8_t and std::u8string.

The minimum supported version of Rust will always be at least three months old (stable - 2). Actual updates to the MSRV are expected to be fairly sporadic, but will happen without ceremony as soon as they are desired for any reason.