MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / ParseVersion

Method ParseVersion

framework/src/bundle/BundleVersion.cpp:155–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153 BundleVersion::BundleVersion(BundleVersion const&) = default;
154
155 BundleVersion
156 BundleVersion::ParseVersion(std::string const& version)
157 {
158 if (version.empty())
159 {
160 return EmptyVersion();
161 }
162
163 std::string version2(version);
164 version2.erase(0, version2.find_first_not_of(' '));
165 version2.erase(version2.find_last_not_of(' ') + 1);
166 if (version2.empty())
167 {
168 return EmptyVersion();
169 }
170
171 return BundleVersion(version2);
172 }
173
174 bool
175 BundleVersion::IsUndefined() const

Callers

nothing calls this directly

Calls 3

BundleVersionClass · 0.85
emptyMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected