14#include <rtl/string.hxx>
15#include <rtl/ustring.hxx>
31 if (nChar >=
'0' && nChar <=
'9')
33 else if (nChar >=
'a' && nChar <=
'f')
34 return nChar -
'a' + 10;
35 else if (nChar >=
'A' && nChar <=
'F')
36 return nChar -
'A' + 10;
46 void parse(std::string_view rString)
48 if (rString.size() != 38)
51 if (rString[0] !=
'{' || rString[37] !=
'}' || rString[9] !=
'-' || rString[14] !=
'-'
52 || rString[19] !=
'-' || rString[24] !=
'-')
55 for (
size_t x = 1;
x <= 8;
x++)
56 if (!std::isxdigit(rString[
x]))
58 for (
size_t x = 10;
x <= 13;
x++)
59 if (!std::isxdigit(rString[
x]))
61 for (
size_t x = 15;
x <= 18;
x++)
62 if (!std::isxdigit(rString[
x]))
64 for (
size_t x = 20;
x <= 23;
x++)
65 if (!std::isxdigit(rString[
x]))
67 for (
size_t x = 25;
x <= 36;
x++)
68 if (!std::isxdigit(rString[
x]))
116 std::copy(aGuidArray, aGuidArray + 16,
maGuidArray.begin());
135 snprintf(sBuffer,
sizeof(sBuffer),
136 "{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
142 return OString(sBuffer);
155template <
typename charT,
typename traits>
156inline std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& rStream,
160 rStream <<
"GUID" << aString.getStr();