Tag: string_view
2 posts
-
C++ string vs string_view: Fast, Non-Owning String Handling (C++17)
std::string vs std::string_view: avoid copies in read-only APIs, allocation costs, lifetime rules, substring performance, and null-termination caveats.
-
[2026] C++ string fundamentals — std::string, C strings, string_view, and practical patterns
C++ strings: std::string ops, C-string comparison with strcmp (not ==), string_view lifetimes, common bugs, and performance tips—with runnable examples.