diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-14 03:54:55 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-14 23:52:45 +0200 |
commit | 3805d1384894a33ecb09e4852d47afb04ddb0687 (patch) | |
tree | 840b5920d912576554e0e11e67794a726d4a9c4f /src/utils/stringutils.cpp | |
parent | 36ccecd553539955929f1ce535b8925533922e4e (diff) | |
download | plus-3805d1384894a33ecb09e4852d47afb04ddb0687.tar.gz plus-3805d1384894a33ecb09e4852d47afb04ddb0687.tar.bz2 plus-3805d1384894a33ecb09e4852d47afb04ddb0687.tar.xz plus-3805d1384894a33ecb09e4852d47afb04ddb0687.zip |
Replace sprites functionality (need support in client data).
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r-- | src/utils/stringutils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 99316ce32..357938fb8 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -375,3 +375,14 @@ std::set<int> splitToIntSet(const std::string &text, char separator) return tokens; } + +std::list<int> splitToIntList(const std::string &text, char separator) +{ + std::list<int> tokens; + std::stringstream ss(text); + std::string item; + while(std::getline(ss, item, separator)) + tokens.push_back(atoi(item.c_str())); + + return tokens; +} |