Here you can find the source of lpadding(String s, int n, String padding)
private static String lpadding(String s, int n, String padding)
//package com.java2s; //License from project: Apache License public class Main { private static String lpadding(String s, int n, String padding) { StringBuilder strbuf = new StringBuilder(); for (int i = 0; i < n - s.length(); i++) { strbuf.append(padding);/*from w ww . ja va2s .c o m*/ } strbuf.append(s); return strbuf.toString(); } }