MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / numberOfCharacters

Method numberOfCharacters

Bcore/src/main/cpp/Dobby/tests/catch.hpp:9632–9646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9630}
9631
9632auto StringRef::numberOfCharacters() const noexcept -> size_type {
9633 size_type noChars = m_size;
9634 // Make adjustments for uft encodings
9635 for (size_type i = 0; i < m_size; ++i) {
9636 char c = m_start[i];
9637 if ((c & byte_2_lead) == byte_2_lead) {
9638 noChars--;
9639 if ((c & byte_3_lead) == byte_3_lead)
9640 noChars--;
9641 if ((c & byte_4_lead) == byte_4_lead)
9642 noChars--;
9643 }
9644 }
9645 return noChars;
9646}
9647
9648auto operator+(StringRef const &lhs, StringRef const &rhs) -> std::string {
9649 std::string str;

Callers 1

TablePrinterClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected