Loyc.Syntax.PrintHelpers.HexDigitChar C# (CSharp) Method

HexDigitChar() public static method

Gets the hex digit character for the specified value, or '?' if the value is not in the range 0...15. Uses uppercase.
public static HexDigitChar ( int value ) : char
value int
return char
		public static char HexDigitChar(int value)
		{
			if ((uint)value < 10)
				return (char)('0' + value);
			else if ((uint)value < 16)
				return (char)('A' - 10 + value);
			else
				return '?';
		}