Lines Matching defs:std
27 const std::regex uuidRegex("^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$");
53 UUID UUID::FromString(const std::string &name)
56 std::string tmp = name;
57 std::size_t pos = tmp.find("-");
59 while (pos != std::string::npos) {
64 for (std::size_t i = 0; (i + 1) < tmp.length();) {
65 ret.uuid_[i / 2] = std::stoi(tmp.substr(i, 2), nullptr, 16); // uuid的长度为16,i / 2作为uuid的数组下标
106 std::string UUID::ToString() const
108 std::string tmp = "";
109 std::string ret = "";
160 UUID UUID::ConvertFrom128Bits(const std::array<uint8_t, UUID::UUID128_BYTES_LEN> &name)
169 std::array<uint8_t, UUID::UUID128_BYTES_LEN> UUID::ConvertTo128Bits() const
171 std::array<uint8_t, UUID::UUID128_BYTES_LEN> uuid;
190 bool IsValidUuid(std::string uuid)