We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks for your work! I'm enjoying playing with the library.
I found this handy fwiw:
struct sv_buffer { public: constexpr sv_buffer(std::string_view str) : str(str) {} constexpr sv_buffer(const char *str) : str(str) {} constexpr auto begin() const { return str.cbegin(); } constexpr auto end() const { return str.cend(); } using iterator = std::string_view::const_iterator; constexpr std::string_view get_view(iterator start, iterator end) const { return std::string_view(str.data() + (start - str.begin()), end - start); } private: std::string_view str; };
The text was updated successfully, but these errors were encountered:
You are welcome! You can prepare a PR with this if you want. Name it string_view_buffer though.
Sorry, something went wrong.
Merged with #74
No branches or pull requests
Thanks for your work! I'm enjoying playing with the library.
I found this handy fwiw:
The text was updated successfully, but these errors were encountered: