Java Integer to int2EyptStr(int num)

Here you can find the source of int2EyptStr(int num)

Description

int Eypt Str

License

LGPL

Declaration

public static String int2EyptStr(int num) 

Method Source Code

//package com.java2s;

public class Main {

    public static String int2EyptStr(int num) {
        char[] tmp = new char[32];
        int i = 0;
        if (0 == num) {
            tmp[31] = '0';
            i = 1;//from   w  w  w  .jav  a  2s  . c o m
        }
        while (0 != num && i < 32) {
            int v = num % 32;
            if (v < 10)
                tmp[31 - i] = (char) (v + '0');
            else
                tmp[31 - i] = (char) (v - 10 + 'A');
            num = num / 32;
            i++;
        }
        return new String(tmp, 32 - i, i);
    }
}

Related

  1. int2buff(int n)
  2. int2Char(int i)
  3. int2Date(Integer date, String interval)
  4. int2ddouble(final int i)
  5. int2double(int[] ia)
  6. int2float(Integer integer)
  7. int2Integer(int[] array)
  8. int2minBeb(final int x)
  9. int2path(int v)