Пример #1
0
        /// <summary>
        /// Removes the next char if it's a Command Prefix, and
        /// sets dbl = true, if it is double.
        /// </summary>
        public static bool ConsumeCommandPrefix(StringStream str, out bool dbl)
        {
            var c = str.PeekChar();

            if (IsCommandPrefix(c))
            {
                str.Position++;
                dbl = str.ConsumeNext(c);
                return(true);
            }
            dbl = false;
            return(false);
        }
Пример #2
0
        /// <summary>
        /// Removes the next char if it's a Command Prefix, and
        /// sets dbl = true, if it is double.
        /// </summary>
        public static bool ConsumeCommandPrefix(StringStream str, out bool dbl)
        {
            char c = str.PeekChar();

            if (RealmCommandHandler.IsCommandPrefix(c))
            {
                ++str.Position;
                dbl = str.ConsumeNext(c);
                return(true);
            }

            dbl = false;
            return(false);
        }