Core for viewing achievements of others

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13656 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
unitraxx
2013-09-09 23:10:36 +00:00
parent add8007dcb
commit 095d5a58c1
7 changed files with 91 additions and 20 deletions
+12
View File
@@ -263,6 +263,18 @@ namespace StringUtils
} // split
std::vector<uint32_t> splitToUInt(const std::string& s, char c, bool keepSplitChar)
{
std::vector<std::string> parts = split(s, c, keepSplitChar);
std::vector<uint32_t> ints;
for(unsigned int i = 0; i < parts.size(); ++i)
{
ints.push_back(atoi(parts[i].c_str()));
}
return ints;
}
// ------------------------------------------------------------------------
/** Splits a : separated string (like PATH) into its individual components.
* It especially handles Windows-style paths (c:/mydir1:d:/mydir2)