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

Method suffix_if

lib/swoc/include/swoc/TextView.h:1405–1413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1403
1404template <typename F>
1405auto
1406TextView::suffix_if(F const &pred) const -> self_type {
1407 self_type zret;
1408 if (auto n = this->rfind_if(pred); n != npos) {
1409 ++n;
1410 zret.assign(this->data() + n, this->size() - n);
1411 }
1412 return zret;
1413}
1414
1415inline auto
1416TextView::remove_suffix(size_t n) -> self_type & {

Callers 1

test_TextView.ccFile · 0.80

Calls 4

rfind_ifMethod · 0.95
dataMethod · 0.95
assignMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected