mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Standardize tooltip row detection
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user