Strings In Depth11 / 15
Up next

std::string_view

#include <print>
#include <string>
#include <string_view>

int main() {
    std::string owned = "hello";
    // a view points into owned's buffer with no copy
    std::string_view view = owned;
    std::println("{} {}", owned, view);
}
What you're solving

a borrowed, non-owning window