diff --git a/src/utils.cpp b/src/utils.cpp index b3f9effd..57e9fa9d 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -5,9 +5,6 @@ #include namespace Exiv2 { -bool startsWith(std::string_view s, std::string_view start) { - return s.find(start) == 0; -} std::string upper(const std::string& str) { std::string result; diff --git a/src/utils.hpp b/src/utils.hpp index a2bb5c15..a8f21c43 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -5,7 +5,9 @@ #include namespace Exiv2 { -bool startsWith(std::string_view s, std::string_view start); +constexpr bool startsWith(std::string_view s, std::string_view start) { + return s.find(start) == 0; +} /// @brief Returns the uppercase version of \b str std::string upper(const std::string& str);