MCPcopy Create free account
hub / github.com/boostorg/compute / find

Method find

include/boost/compute/container/basic_string.hpp:266–275  ·  view source on GitHub ↗

Finds the first character \p ch

Source from the content-addressed store, hash-verified

264
265 /// Finds the first character \p ch
266 size_type find(CharT ch, size_type pos = 0) const
267 {
268 const_iterator iter = ::boost::compute::find(begin() + pos, end(), ch);
269 if(iter == end()){
270 return npos;
271 }
272 else {
273 return static_cast<size_type>(std::distance(begin(), iter));
274 }
275 }
276
277 /// Finds the first substring equal to \p str
278 size_type find(basic_string& str, size_type pos = 0) const

Callers

nothing calls this directly

Calls 4

findFunction · 0.85
searchFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected