Java Char to Int charToInt(char c)

Here you can find the source of charToInt(char c)

Description

char To Int

License

Open Source License

Declaration

public static int charToInt(char c) 

Method Source Code

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

public class Main {
    public static int charToInt(char c) {
        try {/* ww  w .  j  a v  a  2 s.co m*/
            return Integer.parseInt("" + c);
        } catch (NumberFormatException e) {
            return Integer.decode("0x" + c);
        }
    }
}

Related

  1. CHAR2QUAL(char qual)
  2. charToIndex(char c)
  3. charToIndex(Character c)
  4. charToInt(char c)
  5. charToInt(char c)
  6. charToInt(char c)
  7. charToInt(char c)
  8. twoChars2Int(char ch, char cl)