Add string_view support to more UTF functions

This commit is contained in:
Henrik Rydgård
2024-01-12 12:34:47 +01:00
parent 9c9fe8bf8f
commit 0fc3e2b777
6 changed files with 43 additions and 43 deletions
+2 -1
View File
@@ -81,8 +81,9 @@ std::string StripQuotes(const std::string &s);
std::string_view StripSpaces(std::string_view s);
std::string_view StripQuotes(std::string_view s);
// TODO: Make this a lot more efficient by outputting string_views.
// NOTE: str must live at least as long as all uses of output.
void SplitString(std::string_view str, const char delim, std::vector<std::string_view> &output);
// Try to avoid this when possible, in favor of the string_view version.
void SplitString(std::string_view str, const char delim, std::vector<std::string> &output);
void GetQuotedStrings(const std::string& str, std::vector<std::string>& output);