tiny-utf8
tiny-utf8 copied to clipboard
Implement constructor from and conversion to std::string_view.
This allows to get rid of various unnecessary copies in my code. E.g., data passed as std::string_view can be used to directly construct an UTF-8 string without having to create a temporary std::string. Also, it allows to pass the UTF-8 string directly to various functions that accept a std::string_view.
I've tried to follow the surrounding code style (including the trailing whitespace). Feel free to let me know if aynthing should be changed (or adjust it yourself, you should have permission to push edits).