Using std::string_view with api that expects null-terminated string
I solved this problem by creating an alternate string_view class called zstring_view. It’s privately inherited from string_view and contains much of its interface. The principal difference is that zstring_view cannot be created from a string_view. Also, any string_view APIs that would remove elements from the end are not part of the interface or they return … Read more