MCPcopy Create free account
hub / github.com/apache/trafficserver / prefix_if

Method prefix_if

lib/swoc/include/swoc/TextView.h:1278–1285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1276
1277template <typename F>
1278auto
1279TextView::prefix_if(F const &pred) const -> self_type {
1280 self_type zret; // default to empty return.
1281 if (auto n = this->find_if(pred); n != npos) {
1282 zret.assign(this->data(), n);
1283 }
1284 return zret;
1285}
1286
1287inline auto
1288TextView::remove_prefix(size_t n) -> self_type & {

Callers 1

test_TextView.ccFile · 0.80

Calls 3

find_ifMethod · 0.95
dataMethod · 0.95
assignMethod · 0.45

Tested by

no test coverage detected