System.Text.RegularExpressions.RegexInterpreter.Stringmatch C# (CSharp) Method

Stringmatch() private method

private Stringmatch ( string str ) : bool
str string
return bool
        private bool Stringmatch(string str)
        {
            int c;
            int pos;

            if (!_rightToLeft)
            {
                if (runtextend - runtextpos < (c = str.Length))
                    return false;

                pos = runtextpos + c;
            }
            else
            {
                if (runtextpos - runtextbeg < (c = str.Length))
                    return false;

                pos = runtextpos;
            }

            if (!_caseInsensitive)
            {
                while (c != 0)
                    if (str[--c] != runtext[--pos])
                        return false;
            }
            else
            {
                while (c != 0)
                    if (str[--c] != _culture.TextInfo.ToLower(runtext[--pos]))
                        return false;
            }

            if (!_rightToLeft)
            {
                pos += str.Length;
            }

            runtextpos = pos;

            return true;
        }