MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / next_utf8_char_pos

Function next_utf8_char_pos

common/console.cpp:441–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439 }
440
441 static size_t next_utf8_char_pos(const std::string & line, size_t pos) {
442 if (pos >= line.length()) return line.length();
443 pos++;
444 while (pos < line.length() && (line[pos] & 0xC0) == 0x80) {
445 pos++;
446 }
447 return pos;
448 }
449
450 static void move_cursor(int delta);
451 static void move_word_left(size_t & char_pos, size_t & byte_pos, const std::vector<int> & widths, const std::string & line);

Callers 2

delete_at_cursorFunction · 0.85
readline_advancedFunction · 0.85

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected