#c-strings #cstr #zstr #u8string #cstring8

no-std cstr8

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

5 releases

0.1.4 Apr 13, 2024
0.1.3 Mar 3, 2024
0.1.2 Aug 6, 2023
0.1.1 Jun 14, 2022
0.1.0 Jun 8, 2022

#83 in FFI

MIT/Apache

35KB
709 lines

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.


lib.rs:

String types that are both valid UTF-8 and nul-terminated.

No runtime deps

Features