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

Function has_ctrl_modifier

common/console.cpp:549–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547 }
548
549 static bool has_ctrl_modifier(const std::string & params) {
550 size_t start = 0;
551 while (start < params.size()) {
552 size_t end = params.find(';', start);
553 size_t len = (end == std::string::npos) ? params.size() - start : end - start;
554 if (len > 0) {
555 int value = 0;
556 for (size_t i = 0; i < len; ++i) {
557 char ch = params[start + i];
558 if (!std::isdigit(static_cast<unsigned char>(ch))) {
559 value = -1;
560 break;
561 }
562 value = value * 10 + (ch - '0');
563 }
564 if (value == 5) {
565 return true;
566 }
567 }
568
569 if (end == std::string::npos) {
570 break;
571 }
572 start = end + 1;
573 }
574 return false;
575 }
576
577 static bool is_space_codepoint(char32_t cp) {
578 return std::iswspace(static_cast<wint_t>(cp)) != 0;

Callers 1

readline_advancedFunction · 0.85

Calls 2

findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected