Java Integer Align align(int i)

Here you can find the source of align(int i)

Description

align

License

Open Source License

Declaration

private static String align(int i) 

Method Source Code

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

public class Main {
    private static String align(int i) {
        String s = String.valueOf(i);
        if (s.length() == 0) {
            return "00" + s;
        }//from  w  w  w.j av  a 2s  .co  m
        if (s.length() == 1) {
            return "0" + s;
        }
        return s;
    }
}

Related

  1. align(final int value, final int align)
  2. align(final int value, final int alignment)
  3. align(final int value, final int pow2alignment)
  4. align(int addr, int align)
  5. align(int cur, int longest)
  6. align(int min, int number, int max)
  7. align(int pos, int align)
  8. align(int size)
  9. align(int size, int align)