MCPcopy Create free account
hub / github.com/Snapchat/Valdi / startsWith

Method startsWith

valdi_core/src/valdi_core/cpp/Utils/PathUtils.cpp:233–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233bool Path::startsWith(const Path& otherPath) const {
234 auto otherSize = otherPath._components.size();
235 if (otherSize > _components.size()) {
236 return false;
237 }
238
239 for (size_t i = 0; i < otherSize; i++) {
240 if (_components[i] != otherPath._components[i]) {
241 return false;
242 }
243 }
244
245 return true;
246}
247
248const std::vector<std::string>& Path::getComponents() const {
249 return _components;

Callers 15

runScriptAsRemoteMethod · 0.80
_getLocationMethod · 0.80
logCompletionsFunction · 0.80
rebaseRemoteToLocalFunction · 0.80
rebaseLocalToRemoteFunction · 0.80
defaultArgsFunction · 0.80
registrationsMethod · 0.80
resolveCodeLaunchArgsFunction · 0.80
tryGetProgramFromArgsFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 2

TESTFunction · 0.64
compileAsCFunction · 0.64