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

Function clear_current_line

subprojects/llama.cpp/common/console.cpp:482–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480 }
481
482 static void clear_current_line(const std::vector<int> & widths) {
483 int total_width = 0;
484 for (int w : widths) {
485 total_width += (w > 0 ? w : 1);
486 }
487
488 if (total_width > 0) {
489 std::string spaces(total_width, ' ');
490 fwrite(spaces.c_str(), 1, total_width, out);
491 move_cursor(-total_width);
492 }
493 }
494
495 static void set_line_contents(std::string new_line, std::string & line, std::vector<int> & widths, size_t & char_pos,
496 size_t & byte_pos) {

Callers 1

set_line_contentsFunction · 0.85

Calls 1

move_cursorFunction · 0.85

Tested by

no test coverage detected