Line | Count | Source |
1 | | #include "utils.hpp" |
2 | | |
3 | | #include <cctype> |
4 | | #include <string> |
5 | | |
6 | | namespace Exiv2::Internal { |
7 | | |
8 | 344 | std::string upper(std::string_view str) { |
9 | 344 | std::string result; |
10 | 344 | result.reserve(str.size()); |
11 | 344 | for (auto c : str) |
12 | 1.37k | result.push_back(std::toupper(static_cast<unsigned char>(c))); |
13 | 344 | return result; |
14 | 344 | } |
15 | | |
16 | 0 | std::string lower(std::string_view a) { |
17 | 0 | std::string b; |
18 | 0 | b.reserve(a.size()); |
19 | 0 | for (auto c : a) |
20 | 0 | b.push_back(std::tolower(static_cast<unsigned char>(c))); |
21 | 0 | return b; |
22 | 0 | } |
23 | | |
24 | | } // namespace Exiv2::Internal |