CNCGUI.TextParser.MoveAhead C# (CSharp) Method

MoveAhead() public method

Moves the current position ahead one character
public MoveAhead ( ) : void
return void
        public void MoveAhead()
        {
            MoveAhead(1);
        }

Same methods

TextParser::MoveAhead ( int ahead ) : void

Usage Example

Example #1
0
        /// <summary>
        /// Parse an octal field
        /// </summary>
        private bool ParseOctal(TextParser input, FormatSpecifier spec)
        {
            // Skip any whitespace
            input.MovePastWhitespace();

            // Parse digits
            int start = input.Position;

            while (IsValidDigit(input.Peek(), 8))
            {
                input.MoveAhead();
            }

            // Don't exceed field width
            if (spec.Width > 0)
            {
                int count = input.Position - start;
                if (spec.Width < count)
                {
                    input.MoveAhead(spec.Width - count);
                }
            }

            // Extract token
            if (input.Position > start)
            {
                if (!spec.NoResult)
                {
                    AddUnsigned(input.Extract(start, input.Position), spec.Modifier, 8);
                }
                return(true);
            }
            return(false);
        }
All Usage Examples Of CNCGUI.TextParser::MoveAhead