MCPcopy Create free account
hub / github.com/Kitware/CMake / IsPrefix

Method IsPrefix

Source/cmCMakePath.cxx:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool cmCMakePath::IsPrefix(cmCMakePath const& path) const
85{
86 auto prefix_it = this->Path.begin();
87 auto prefix_end = this->Path.end();
88 auto path_it = path.Path.begin();
89 auto path_end = path.Path.end();
90
91 while (prefix_it != prefix_end && path_it != path_end &&
92 *prefix_it == *path_it) {
93 ++prefix_it;
94 ++path_it;
95 }
96 return (prefix_it == prefix_end) ||
97 (prefix_it->empty() && path_it != path_end);
98}
99
100std::string cmCMakePath::FormatPath(std::string path, format fmt)
101{

Callers 3

operator()Method · 0.80
EvaluateMethod · 0.80
HandleIsPrefixCommandFunction · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected