summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-27 03:35:10 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-27 03:35:10 +0300
commit7ed530350226d268c3ccb80952f4176589e9a32a (patch)
tree05c4d030d2c872ae458fd2606ec116c1a636e8b2 /src/utils/stringutils.cpp
parent10502e29937b67d5f2d62cf70804a4de76c5cf69 (diff)
downloadmanaverse-7ed530350226d268c3ccb80952f4176589e9a32a.tar.gz
manaverse-7ed530350226d268c3ccb80952f4176589e9a32a.tar.bz2
manaverse-7ed530350226d268c3ccb80952f4176589e9a32a.tar.xz
manaverse-7ed530350226d268c3ccb80952f4176589e9a32a.zip
Autoselect resolution under android.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index e28013320..8c6d88d1c 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -476,6 +476,19 @@ void splitToStringSet(std::set<std::string> &tokens, const std::string &text,
}
}
+void splitToIntVector(std::vector<int> &tokens, const std::string &text,
+ const char separator)
+{
+ std::stringstream ss(text);
+ std::string item;
+ while (std::getline(ss, item, separator))
+ {
+ item = trim(item);
+ if (!item.empty())
+ tokens.push_back(atoi(item.c_str()));
+ }
+}
+
std::string combineDye(std::string file, std::string dye)
{
if (dye.empty())