MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / numberOfCharacters

Method numberOfCharacters

tests/catch.hpp:11246–11260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11244 }
11245
11246 auto StringRef::numberOfCharacters() const noexcept -> size_type {
11247 size_type noChars = m_size;
11248 // Make adjustments for uft encodings
11249 for( size_type i=0; i < m_size; ++i ) {
11250 char c = m_start[i];
11251 if( ( c & byte_2_lead ) == byte_2_lead ) {
11252 noChars--;
11253 if (( c & byte_3_lead ) == byte_3_lead )
11254 noChars--;
11255 if( ( c & byte_4_lead ) == byte_4_lead )
11256 noChars--;
11257 }
11258 }
11259 return noChars;
11260 }
11261
11262 auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string {
11263 std::string str;

Callers 1

TablePrinterClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected