By using the std::string_view constructor for std::string, we can avoid the char* constructor, which would require a strlen call in order to determine the string size. This also allows it to work with non-null-terminated strings.