#cstr #cstring #u8string #cstring8 #zstr

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

#86 in FFI

Download history 6/week @ 2024-02-17 7/week @ 2024-02-24 166/week @ 2024-03-02 11/week @ 2024-03-09 1/week @ 2024-03-16 6/week @ 2024-03-30 2/week @ 2024-04-06 189/week @ 2024-04-13 2/week @ 2024-04-20

191 downloads per month

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