MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / move_to_line_end

Function move_to_line_end

subprojects/llama.cpp/common/console.cpp:529–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527 }
528
529 static void move_to_line_end(size_t & char_pos, size_t & byte_pos, const std::vector<int> & widths, const std::string & line) {
530 int forward_width = 0;
531 for (size_t i = char_pos; i < widths.size(); ++i) {
532 forward_width += widths[i];
533 }
534 move_cursor(forward_width);
535 char_pos = widths.size();
536 byte_pos = line.length();
537 }
538
539 static bool has_ctrl_modifier(const std::string & params) {
540 size_t start = 0;

Callers 1

readline_advancedFunction · 0.85

Calls 3

move_cursorFunction · 0.85
sizeMethod · 0.65
lengthMethod · 0.65

Tested by

no test coverage detected