FairyGUI.Utils.ToolSet.CharToHex C# (CSharp) Method

CharToHex() public static method

public static CharToHex ( char c ) : int
c char
return int
        public static int CharToHex(char c)
        {
            if (c >= '0' && c <= '9')
                return (int)c - 48;
            if (c >= 'A' && c <= 'F')
                return 10 + (int)c - 65;
            else if (c >= 'a' && c <= 'f')
                return 10 + (int)c - 97;
            else
                return 0;
        }