Summary
Jason showcases scnlib, a modern and safe replacement for scanf that provides format-based parsing similar to how lib{fmt} provides formatting. The library allows parsing strings with format specifications, returns testable results, and integrates well with modern C++ features like structured bindings. Whitespace is skipped by default, and the API is designed to be intuitive and safe. This library is being considered for standardization under proposal P1729 (revision 5 as of October 2024), aiming to make parsing in C++ significantly easier and safer than current approaches.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[string.view]40% match -
[stringstream]40% match