is char Hex Digit - Android java.lang

Android examples for java.lang:Character

Description

is char Hex Digit

Demo Code


//package com.java2s;

public class Main {
    static public boolean isHexDigit(char c) {
        if (isNumeric(c) || (c > 64 && c < 71) || (c > 96 && c < 103))
            return true;
        return false;
    }//w w w .j a  va2 s  .  c  om

    static public boolean isNumeric(char c) {
        return c >= '0' && c <= '9';
    }
}

Related Tutorials