| 457 | } |
| 458 | |
| 459 | idx_t ShellState::RenderLength(const char *str, idx_t str_len) { |
| 460 | #ifdef HAVE_LINENOISE |
| 461 | return linenoiseComputeRenderWidth(str, str_len); |
| 462 | #else |
| 463 | idx_t n = 0; |
| 464 | for (idx_t i = 0; i < str_len; i++) { |
| 465 | if (IsCharacter(str[i])) { |
| 466 | n++; |
| 467 | } |
| 468 | } |
| 469 | return n; |
| 470 | #endif |
| 471 | } |
| 472 | |
| 473 | idx_t ShellState::RenderLength(duckdb::string_t str) { |
| 474 | return RenderLength(str.GetData(), str.GetSize()); |
no test coverage detected