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

Method find

Utilities/std/cm/bits/string_view.cxx:85–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85string_view::size_type string_view::find(string_view v,
86 size_type pos) const noexcept
87{
88 if (pos < size_) {
89 for (; pos + v.size_ <= size_; ++pos) {
90 if (std::char_traits<char>::compare(data_ + pos, v.data_, v.size_) ==
91 0) {
92 return pos;
93 }
94 }
95 }
96 return npos;
97}
98
99string_view::size_type string_view::find(char c, size_type pos) const noexcept
100{

Callers 2

checkMethod · 0.45
runMethod · 0.45

Calls 2

compareFunction · 0.50
findFunction · 0.50

Tested by

no test coverage detected