Java Hex Convert To convertHex(char c)

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

Description

convert Hex

License

Open Source License

Declaration

private static int convertHex(char c) 

Method Source Code

//package com.java2s;

public class Main {
    private static int convertHex(char c) {
        if ('0' <= c && c <= '9') {
            return c - '0';
        }/* w w w  . ja  v  a 2 s . c o m*/
        if ('a' <= c && c <= 'f') {
            return c - 'a' + 10;
        }
        return c - 'A' + 10;
    }
}

Related

  1. convertHexa(String bool)
  2. convertHexadecimal2RGB(final String hexColor, final String divider)
  3. convertHexByteToTelcoChar(byte byteValue)
  4. convertHexChars(final String value)