MCPcopy Index your code
hub / github.com/cli-table/cli-table3 / strlen

Function strlen

src/utils.js:7–14  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

5}
6
7function strlen(str) {
8 let code = codeRegex();
9 let stripped = ('' + str).replace(code, '');
10 let split = stripped.split('\n');
11 return split.reduce(function (memo, s) {
12 return stringWidth(s) > memo ? stringWidth(s) : memo;
13 }, 0);
14}
15
16function repeat(str, times) {
17 return Array(times + 1).join(str);

Callers 6

utils-test.jsFile · 0.85
padFunction · 0.85
truncateWidthFunction · 0.85
truncateWidthWithAnsiFunction · 0.85
truncateFunction · 0.85
wordWrapFunction · 0.85

Calls 1

codeRegexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…