Implement fmt::to_lower

It was strangely removed...
This commit is contained in:
Nekotekina 2018-05-04 23:49:35 +03:00
parent eae78a8711
commit cfa9b163fd
2 changed files with 9 additions and 0 deletions

View File

@ -423,6 +423,14 @@ std::string fmt::to_upper(const std::string& string)
return result;
}
std::string fmt::to_lower(const std::string& string)
{
std::string result;
result.resize(string.size());
std::transform(string.begin(), string.end(), result.begin(), ::tolower);
return result;
}
bool fmt::match(const std::string& source, const std::string& mask)
{
std::size_t source_position = 0, mask_position = 0;

View File

@ -134,6 +134,7 @@ namespace fmt
}
std::string to_upper(const std::string& string);
std::string to_lower(const std::string& string);
bool match(const std::string& source, const std::string& mask);
}