exiv2/src/utils.cpp
Rosen Penev a6c30dd1dd make upper the same as lower
Small cleanup

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 16:34:00 -07:00

21 lines
422 B
C++

#include "utils.hpp"
#include <algorithm>
#include <cctype>
namespace Exiv2::Internal {
std::string upper(const std::string& str) {
std::string result = str;
std::transform(str.begin(), str.end(), result.begin(), ::toupper);
return result;
}
std::string lower(const std::string& a) {
std::string b = a;
std::transform(a.begin(), a.end(), b.begin(), ::tolower);
return b;
}
} // namespace Exiv2::Internal