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

Method fillRight

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

Source from the content-addressed store, hash-verified

424 }
425
426 public static String fillRight(String s, int len, char fillChar)
427 {
428 if (s == null)
429 {
430 s = "";
431 }
432
433 if (s.length() >= len)
434 {
435 return s;
436 }
437 else
438 {
439 StringBuffer stringbuffer = new StringBuffer(s);
440
441 while (stringbuffer.length() < len)
442 {
443 stringbuffer.append(fillChar);
444 }
445
446 return stringbuffer.toString();
447 }
448 }
449
450 public static boolean equals(Object a, Object b)
451 {

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected