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

Function compare

include/tabulate/string_view_lite.hpp:478–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476
477template< typename CharT >
478inline nssv_constexpr14 int compare( CharT const * s1, CharT const * s2, std::size_t count )
479{
480 while ( count-- != 0 )
481 {
482 if ( *s1 < *s2 ) return -1;
483 if ( *s1 > *s2 ) return +1;
484 ++s1; ++s2;
485 }
486 return 0;
487}
488
489#if nssv_HAVE_BUILTIN_MEMCMP
490

Callers 2

basic_string_viewClass · 0.70
compareMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected