MCPcopy Create free account
hub / github.com/cwida/FastLanes / CorrectDistance

Method CorrectDistance

src/printer/output.cpp:89–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88unsigned TerminalOutput::glyph_length(const std::string& s) const {
89 auto byte_length = s.length();
90 int u = 0;
91 const char* c_str = s.c_str();
92 unsigned glyph_length = 0;
93 while (u < byte_length) {
94 u += std::mblen(&c_str[u], byte_length - static_cast<size_t>(u));

Callers 1

output.cppFile · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected