diff options
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r-- | src/utils/stringutils.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index fcafd7711..1808ea173 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -460,6 +460,19 @@ void splitToStringVector(StringVect &tokens, const std::string &text, } } +void splitToStringSet(std::set<std::string> &tokens, const std::string &text, + char separator) +{ + std::stringstream ss(text); + std::string item; + while (std::getline(ss, item, separator)) + { + item = trim(item); + if (!item.empty()) + tokens.insert(item); + } +} + std::string combineDye(std::string file, std::string dye) { if (dye.empty()) |