Android examples for java.lang:Character
Convert hex to char
//package com.java2s; public class Main { public static int hex2int(char c) { if (c >= '0' && c <= '9') { return (c - '0') * 16; }//from www.jav a 2 s .c o m if (c >= 'A' && c <= 'F') { return (c - 'A' + 10) * 16; } return 0; } }