1
0
Fork 0
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:
Craig Robbins 2014-10-29 16:40:55 +10:00 committed by kwolekr
parent 1cb6ea6346
commit 813c088c1c
3 changed files with 274 additions and 62 deletions

View file

@ -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;
}