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:
parent
b75e7148c2
commit
61ed56f916
2 changed files with 13 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue