MCPcopy Index your code
hub / github.com/Kitware/CMake / match

Method match

Utilities/cmcppdap/src/content_stream.cpp:110–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool ContentReader::match(const uint8_t* seq, size_t len) {
111 if (!buffer(len)) {
112 return false;
113 }
114 auto it = buf.begin();
115 for (size_t i = 0; i < len; i++, it++) {
116 if (*it != seq[i]) {
117 return false;
118 }
119 }
120 for (size_t i = 0; i < len; i++) {
121 buf.pop_front();
122 }
123 return true;
124}
125
126bool ContentReader::match(const char* str) {
127 auto len = strlen(str);

Callers 15

runMethod · 0.45
applyMethod · 0.45
handle_signatureMethod · 0.45
__call__Method · 0.45
applyMethod · 0.45
git_tagsFunction · 0.45
git_list_treeFunction · 0.45
tag_sortkeyFunction · 0.45
ProcessModuleMethod · 0.45
ProcessLineMethod · 0.45

Calls 4

pop_frontMethod · 0.80
strlenFunction · 0.50
matchFunction · 0.50
beginMethod · 0.45

Tested by 15

RunMethod · 0.36
ProcessLineMethod · 0.36
ProcessLineMethod · 0.36
ProcessOptionsMethod · 0.36
ProcessLineMethod · 0.36
ProcessLineMethod · 0.36
ProcessLineMethod · 0.36
ProcessLineMethod · 0.36