예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public static bool IsNumber(UnicodeStream stream)
        {
            for (int i = 0; i < stream.Length; i++)
            {
                if (!IsDigit(stream.CharAt(i)))
                {
                    return(false);
                }
            }

            return(true);
        }