Use only with buffer mangled by wrapString
| 395 | |
| 396 | // Use only with buffer mangled by wrapString |
| 397 | static const char* advanceToNextLineWrapped(const char* str) |
| 398 | { |
| 399 | // Traverse the buffer for the next line |
| 400 | const char* ptr = str; |
| 401 | while (true) |
| 402 | { |
| 403 | const auto chr = static_cast<uint8_t>(*ptr++); |
| 404 | if (chr == 0U) |
| 405 | { |
| 406 | return ptr; |
| 407 | } |
| 408 | |
| 409 | if (chr >= ControlCodes::oneArgBegin && chr < ControlCodes::oneArgEnd) |
| 410 | { |
| 411 | // Skip argument |
| 412 | ptr++; |
| 413 | } |
| 414 | else if (chr >= ControlCodes::twoArgBegin && chr < ControlCodes::twoArgEnd) |
| 415 | { |
| 416 | // Skip argument |
| 417 | ptr += 2; |
| 418 | } |
| 419 | else if (chr >= ControlCodes::fourArgBegin && chr < ControlCodes::fourArgEnd) |
| 420 | { |
| 421 | // Skip argument |
| 422 | ptr += 4; |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | return nullptr; |
| 427 | } |
| 428 | |
| 429 | // 0x00495224 |
| 430 | // al: colour |
no outgoing calls
no test coverage detected