MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / count_all_of

Function count_all_of

test/helpers.h:170–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168namespace cppcheck {
169 template<typename T>
170 std::size_t count_all_of(const std::string& str, T sub) {
171 std::size_t n = 0;
172 std::string::size_type pos = 0;
173 while ((pos = str.find(sub, pos)) != std::string::npos) {
174 ++pos;
175 ++n;
176 }
177 return n;
178 }
179}
180
181/* designated initialization helper

Callers 12

many_threadsMethod · 0.85
showtime_top5_fileMethod · 0.85
showtime_fileMethod · 0.85
many_threadsMethod · 0.85
showtime_top5_fileMethod · 0.85
showtime_fileMethod · 0.85
showtime_top5_fileMethod · 0.85
showtime_fileMethod · 0.85

Calls 1

findMethod · 0.45

Tested by 12

many_threadsMethod · 0.68
showtime_top5_fileMethod · 0.68
showtime_fileMethod · 0.68
many_threadsMethod · 0.68
showtime_top5_fileMethod · 0.68
showtime_fileMethod · 0.68
showtime_top5_fileMethod · 0.68
showtime_fileMethod · 0.68