Here you can find the source of tailPad(String target, String padChar, int length)
public static String tailPad(String target, String padChar, int length)
//package com.java2s; //License from project: Apache License public class Main { public static String tailPad(String target, String padChar, int length) { if (length == 0 || target.length() >= length) { return target; }/*from www.j ava 2 s . c om*/ return tailPad(target + padChar, padChar, length); } }