Lines Matching full:uuid
22 std::string CanonicalUuid(std::string uuid) {
23 if (uuid.empty())
26 if (uuid.size() < 11 && uuid.find("0x") == 0)
27 uuid = uuid.substr(2);
29 if (!(uuid.size() == 4 || uuid.size() == 8 || uuid.size() == 36))
32 if (uuid.size() == 4 || uuid.size() == 8) {
33 for (size_t i = 0; i < uuid.size(); ++i) {
34 if (!IsHexDigit(uuid[i]))
38 if (uuid.size() == 4)
39 return kCommonUuidPrefix + uuid + kCommonUuidPostfix;
41 return uuid + kCommonUuidPostfix;
44 std::string uuid_result(uuid);
47 if (uuid[i] != '-')
50 if (!IsHexDigit(uuid[i]))
52 uuid_result[i] = tolower(uuid[i]);