MCPcopy Create free account
hub / github.com/apache/mesos / isStrictSubroleOf

Function isStrictSubroleOf

src/common/roles.cpp:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace roles {
34
35bool isStrictSubroleOf(const std::string& left, const std::string& right)
36{
37 return left.size() > right.size() &&
38 left[right.size()] == '/' &&
39 strings::startsWith(left, right);
40}
41
42
43// TODO(haosdent): Remove this function after we stop supporting `--roles`

Callers 10

TEST_FFunction · 0.85
validateMethod · 0.85
isAllocatableToMethod · 0.85
validateMethod · 0.85
isAllocatableToMethod · 0.85
foreachFunction · 0.85

Calls 2

startsWithFunction · 0.85
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68