MCPcopy Create free account
hub / github.com/duckdb/duckdb / RenderLength

Method RenderLength

tools/shell/shell.cpp:459–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457}
458
459idx_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
473idx_t ShellState::RenderLength(duckdb::string_t str) {
474 return RenderLength(str.GetData(), str.GetSize());

Callers 5

GenerateProgressBarMethod · 0.80
RenderAlignedValueMethod · 0.80
AnalyzeMethod · 0.80
ProcessCharacterMethod · 0.80
HandleTextMethod · 0.80

Calls 6

IsCharacterFunction · 0.85
c_strMethod · 0.80
GetDataMethod · 0.45
GetSizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected