Java String Pad Right rightPad(String value, int length)

Here you can find the source of rightPad(String value, int length)

Description

right Pad

License

Open Source License

Declaration

public static String rightPad(String value, int length) 

Method Source Code

//package com.java2s;

public class Main {
    public static String rightPad(String value, int length) {
        StringBuffer buffer = new StringBuffer(value);
        while (buffer.length() < length) {
            buffer.append(' ');
        }//from w  ww  .j  av a2  s  .  c  o m
        return buffer.toString();
    }
}

Related

  1. rightPad(String str, String pad, int len)
  2. rightPad(String string, int length)
  3. rightPad(String strInput, int intLength)
  4. rightPad(String targetStr, char appendChar, int length)
  5. rightPad(String toPad, int totalLength)
  6. rightPad(String value, int makeLength, char paddingCharacter)
  7. rightPad(String value, int tamanho, String pad)
  8. rightPad(StringBuilder pStringBuilder, int pLength, char pChar)
  9. rightPadded(String src, int len)