Loading...
Searching...
No Matches
utils.hpp
#ifndef EXIV2_UTILS_HPP
#define EXIV2_UTILS_HPP
#include <string>
#include <string_view>
namespace Exiv2::Internal {
template <typename T>
constexpr bool startsWith(std::string_view s, T start) {
#ifdef __cpp_lib_starts_ends_with
return s.starts_with(start);
#else
return s.find(start) == 0;
#endif
}
template <typename T>
constexpr bool contains(std::string_view s, T c) {
#ifdef __cpp_lib_string_contains
return s.contains(c);
#else
return s.find(c) != std::string_view::npos;
#endif
}
std::string upper(const std::string& str);
std::string lower(const std::string& a);
} // namespace Exiv2::Internal
#endif // EXIV2_UTILS_HPP
Exiv2::Internal
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
Exiv2::Internal::lower
std::string lower(const std::string &a)
Returns the lowercase version of str.
Definition utils.cpp:14
Exiv2::Internal::upper
std::string upper(const std::string &str)
Returns the uppercase version of str.
Definition utils.cpp:8