MCPcopy Create free account
hub / github.com/apache/brpc / IsValidWildcardString

Method IsValidWildcardString

src/butil/version.cc:101–108  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

99
100// static
101bool Version::IsValidWildcardString(const std::string& wildcard_string) {
102 std::string version_string = wildcard_string;
103 if (EndsWith(wildcard_string.c_str(), ".*", false))
104 version_string = wildcard_string.substr(0, wildcard_string.size() - 2);
105
106 Version version(version_string);
107 return version.IsValid();
108}
109
110bool Version::IsOlderThan(const std::string& version_str) const {
111 Version proposed_ver(version_str);

Callers

nothing calls this directly

Calls 5

substrMethod · 0.80
EndsWithFunction · 0.50
c_strMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected