mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Added names colours and refactored parseColorString()
This commit is contained in:
parent
1cb6ea6346
commit
813c088c1c
3 changed files with 274 additions and 62 deletions
|
@ -126,13 +126,8 @@ inline std::vector<std::string> str_split(const std::string &str, char delimiter
|
|||
inline std::string lowercase(const std::string &s)
|
||||
{
|
||||
std::string s2;
|
||||
for(size_t i=0; i<s.size(); i++)
|
||||
{
|
||||
char c = s[i];
|
||||
if(c >= 'A' && c <= 'Z')
|
||||
c -= 'A' - 'a';
|
||||
s2 += c;
|
||||
}
|
||||
for(size_t i = 0; i < s.size(); i++)
|
||||
s2[i] = tolower(s.at(i));
|
||||
return s2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue