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

private static int charToInt(char c) 

Method Source Code

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

public class Main {
    private static int charToInt(char c) {
        int i = 0;

        if (Character.isUpperCase(c))
            i += 26;/*w w  w.  j a  v a  2  s  .c  o  m*/

        return i + Character.getNumericValue(c);

    }
}

Related

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