tiny-utf8 icon indicating copy to clipboard operation
tiny-utf8 copied to clipboard

Implement constructor from and conversion to std::string_view.

Open slackner opened this issue 3 years ago • 0 comments

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).

slackner avatar Dec 08 '22 20:12 slackner