MCPcopy Index your code
hub / github.com/skygragon/leetcode-cli / padRight

Function padRight

lib/sprintf.js:14–17  ·  view source on GitHub ↗
(s, n , c)

Source from the content-addressed store, hash-verified

12}
13
14function padRight(s, n , c) {
15 let k = Math.max(0, n - len(s));
16 return s + c.repeat(k);
17}
18
19function padCenter(s, n, c) {
20 let k = Math.max(0, n - len(s));

Callers 1

tsprintfFunction · 0.85

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected