MCPcopy Index your code
hub / github.com/ccxt/ccxt / leftPad

Method leftPad

java/lib/src/main/java/io/github/ccxt/base/Precise.java:330–336  ·  view source on GitHub ↗
(String s, int size, char ch)

Source from the content-addressed store, hash-verified

328 }
329
330 private static String leftPad(String s, int size, char ch) {
331 if (s.length() >= size) return s;
332 StringBuilder sb = new StringBuilder(size);
333 for (int i = s.length(); i < size; i++) sb.append(ch);
334 sb.append(s);
335 return sb.toString();
336 }
337
338 private static String repeat(char ch, int n) {
339 if (n <= 0) return "";

Callers 1

toStringMethod · 0.95

Calls 3

lengthMethod · 0.45
appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected