1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Standardize tooltip row detection

This commit is contained in:
BlockMen 2014-09-28 10:10:43 +02:00
parent b75e7148c2
commit 61ed56f916
2 changed files with 13 additions and 8 deletions

View file

@ -113,6 +113,16 @@ inline std::vector<std::wstring> str_split(const std::wstring &str, wchar_t deli
return parts;
}
inline std::vector<std::string> str_split(const std::string &str, char delimiter) {
std::vector<std::string> parts;
std::stringstream sstr(str);
std::string part;
while(std::getline(sstr, part, delimiter))
parts.push_back(part);
return parts;
}
inline std::string lowercase(const std::string &s)
{
std::string s2;