MCPcopy Create free account
hub / github.com/MyGUI/mygui / parse

Function parse

MyGUIEngine/include/MyGUI_Version.h:93–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 static Version parse(std::string_view _value)
94 {
95 const std::vector<std::string>& vec = utility::split(_value, ".");
96 if (vec.empty())
97 return {};
98
99 uint8_t major = utility::parseValue<uint8_t>(vec[0]);
100 uint8_t minor = vec.size() > 1 ? utility::parseValue<uint8_t>(vec[1]) : 0;
101 uint16_t patch = vec.size() > 2 ? utility::parseValue<uint16_t>(vec[2]) : 0;
102
103 return {major, minor, patch};
104 }
105
106 private:
107 uint8_t mMajor;

Callers 1

MyGUI_Version.hFile · 0.70

Calls 3

splitFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected