MCPcopy Create free account
hub / github.com/p-ranav/tabulate / substr

Method substr

include/tabulate/string_view_lite.hpp:715–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713 }
714
715 nssv_constexpr14 basic_string_view substr( size_type pos = 0, size_type n = npos ) const
716 {
717#if nssv_CONFIG_NO_EXCEPTIONS
718 assert( pos <= size() );
719#else
720 if ( pos > size() )
721 {
722 throw std::out_of_range("nonstd::string_view::substr()");
723 }
724#endif
725 return basic_string_view( data() + pos, (std::min)( n, size() - pos ) );
726 }
727
728 // compare(), 6x:
729

Callers 4

compareMethod · 0.45
word_wrapMethod · 0.45
split_linesMethod · 0.45
explode_stringMethod · 0.45

Calls 1

basic_string_viewClass · 0.70

Tested by

no test coverage detected