public static UInt64 Hex2Decimal(UnicodeStream stream) { UInt64 dec = 0; for (int i = 0; i < stream.Length; i++) { dec += (UInt64)Math.Pow(16, i) * (UInt64)ReadHexValue(stream.CharAt(stream.Length - (i + 1))); } return(dec); }
public static UInt64 InterpretAsInteger(UnicodeStream stream) { UInt64 dec = 0; for (int i = 0; i < stream.Length; i++) { dec += (UInt64)Math.Pow(10, i) * (UInt64)ReadDigit(stream.CharAt(stream.Length - (i + 1))); } return(dec); }
public static bool IsNumber(UnicodeStream stream) { for (int i = 0; i < stream.Length; i++) { if (!IsDigit(stream.CharAt(i))) { return(false); } } return(true); }