Java Char Convert To convertCharToInt(char input)

Here you can find the source of convertCharToInt(char input)

Description

convert Char To Int

License

Open Source License

Declaration

public static int convertCharToInt(char input) 

Method Source Code

//package com.java2s;

public class Main {

    public static int convertCharToInt(char input) {
        if ((int) input >= (int) 'A') {
            return ((int) input - (int) 'A' + 10);
        } else {//from w  w  w  .  j av  a 2  s  .com
            return ((int) input - (int) '0');
        }
    }
}

Related

  1. convertChars(String orig_name, String chars, char toChar)
  2. convertCharSet(String str, String desCharset)
  3. convertCharsToUnicodeChars(final String s, final boolean toLowerCase)
  4. convertCharToBoolean(final char value)
  5. convertCharToCharacterArray(final Object originalArray)
  6. convertCharToShort(final char[] tmp, final short[] buffer)
  7. convertCharToSimpleRegex(String str, char lastChar, char currentChar)