Always storing MBID in lowercase to avoid silly duplicates

This commit is contained in:
emeric
2020-03-23 18:06:39 +01:00
parent 5ab16ee821
commit a40c05ec6b
4 changed files with 22 additions and 5 deletions
+6
View File
@@ -21,6 +21,8 @@
#include <regex>
#include "utils/String.hpp"
namespace StringUtils
{
template <>
@@ -40,6 +42,10 @@ stringIsUUID(std::string_view str)
return std::regex_match(std::cbegin(str), std::cend(str), re);
}
UUID::UUID(std::string_view str)
: _value {StringUtils::stringToLower(str)}
{
}
std::optional<UUID>
UUID::fromString(std::string_view str)