Java String Pad Left lpad(int length, long number)

Here you can find the source of lpad(int length, long number)

Description

lpad

License

Open Source License

Declaration

public static String lpad(int length, long number) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String lpad(int length, long number) {
        String f = "%0" + length + "d";
        return String.format(f, number);
    }//from   w  w  w.ja v  a  2s . c  o m
}

Related

  1. leftZeroPad(String s)
  2. leftZeroPadding(int number, int howManyChar)
  3. lpad(final String input, final String padCode, final int toLength)
  4. lpad(final String s, final String pad, final int size)
  5. lpad(int i, int length, char c)
  6. lpad(int maxDigits, long val)
  7. lpad(int value, int padLen, char padChar)
  8. lpad(Object str, int len, String padding)
  9. lpad(String base, int len, String pad)