CK.Text.StringMatcher.Forward C# (CSharp) Method

Forward() public method

Increments the StartIndex (and decrements Length) with the specified character count and clears any existing error. Always returns true.
public Forward ( int charCount ) : bool
charCount int The successfully matched character count. /// Must be positive and should not move head past the end of the substring.
return bool
        public bool Forward( int charCount )
        {
            if( charCount < 0 ) throw new ArgumentException( nameof( charCount ) );
            int newLen = _length - charCount;
            if( newLen < 0 ) throw new InvalidOperationException( Impl.CoreResources.StringMatcherForwardPastEnd );
            _startIndex += charCount;
            _length = newLen;
            _errorDescription = null;
            return true;
        }