MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / numberOfCharacters

Method numberOfCharacters

extlibs/catch/include/catch/catch.hpp:13325–13339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13323 }
13324
13325 auto StringRef::numberOfCharacters() const noexcept -> size_type {
13326 size_type noChars = m_size;
13327 // Make adjustments for uft encodings
13328 for( size_type i=0; i < m_size; ++i ) {
13329 char c = m_start[i];
13330 if( ( c & byte_2_lead ) == byte_2_lead ) {
13331 noChars--;
13332 if (( c & byte_3_lead ) == byte_3_lead )
13333 noChars--;
13334 if( ( c & byte_4_lead ) == byte_4_lead )
13335 noChars--;
13336 }
13337 }
13338 return noChars;
13339 }
13340
13341 auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string {
13342 std::string str;

Callers 1

TablePrinterClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected