Java Number Format formatSheetNumber100(final int sheetNumber)

Here you can find the source of formatSheetNumber100(final int sheetNumber)

Description

format Sheet Number

License

Apache License

Declaration

public static String formatSheetNumber100(final int sheetNumber) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String formatSheetNumber100(final int sheetNumber) {
        if (sheetNumber < 10) {
            return "00" + sheetNumber;
        } else if (sheetNumber < 100) {
            return "0" + sheetNumber;
        } else {//from w ww.j a  va  2s  . c om
            return String.valueOf(sheetNumber);
        }
    }
}

Related

  1. formatPhoneNumber(String number)
  2. formatPhoneNumber(String phoneNumber)
  3. formatPrintIntegerToString(long number, boolean printCommasP, boolean printSignP, int radix, int mincol, char padchar, char commachar, int commainterval)
  4. formatRowKey(final long number, final int digits, byte[] dest)
  5. formatSafetyNumber(String digits)
  6. formatSmallerNumber(String prefix, String suffix, long amnt, boolean useDecimals)
  7. formatTo2Digit(int number)
  8. NumberFormat(double str, int max, int min)
  9. numberFormat(double value, String format)