Skip to content

Glossary: Rust in Practice

CString and CStr

Also written: CString, CStr

Rust types for C strings: `CString` owns text with a NUL added to hand to C, and `CStr` wraps a C string you got back so you can read it as text.

Where the book teaches it

Related terms

NULextern "C"