C++20 introduced the std::span which makes it easier to deal with continuous rage. Especially the subview facilities: firstlast and subspan. I wonder if we can add first and last function to std::string_view, then we can generate the substr more intuitively and less fallible:

static_assert("hello world"sv.first(5) == "hello");

Thanks for your reply!