Why C Strings Suck And How I Fixed Them
Summary
The article argues that C strings are problematic due to NUL-termination and lack of explicit length, then presents a practical approach using string views and two struct types (str_view and str_owned) to provide safe, efficient string handling in C. It includes code examples, macros, conversion utilities, and an arena-based memory model, plus a utility suite for string operations like slicing, searching, and splitting.