MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / fillLeft

Method fillLeft

src/main/java/net/optifine/util/StrUtils.java:401–424  ·  view source on GitHub ↗
(String s, int len, char fillChar)

Source from the content-addressed store, hash-verified

399 }
400
401 public static String fillLeft(String s, int len, char fillChar)
402 {
403 if (s == null)
404 {
405 s = "";
406 }
407
408 if (s.length() >= len)
409 {
410 return s;
411 }
412 else
413 {
414 StringBuffer stringbuffer = new StringBuffer();
415 int i = len - s.length();
416
417 while (stringbuffer.length() < i)
418 {
419 stringbuffer.append(fillChar);
420 }
421
422 return stringbuffer.toString() + s;
423 }
424 }
425
426 public static String fillRight(String s, int len, char fillChar)
427 {

Callers 2

stringIncMethod · 0.95
getNbtStringMethod · 0.95

Calls 2

lengthMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected