AddRange() private method

private AddRange ( char first, char last ) : void
first char
last char
return void
コード例 #1
0
ファイル: RegexFCD.cs プロジェクト: dotnet/corefx
        internal RegexFC(char ch, bool not, bool nullable, bool caseInsensitive)
        {
            _cc = new RegexCharClass();

            if (not)
            {
                if (ch > 0)
                    _cc.AddRange('\0', (char)(ch - 1));
                if (ch < 0xFFFF)
                    _cc.AddRange((char)(ch + 1), '\uFFFF');
            }
            else
            {
                _cc.AddRange(ch, ch);
            }

            _caseInsensitive = caseInsensitive;
            _nullable = nullable;
        }
コード例 #2
0
        internal RegexFC(char ch, bool not, bool nullable, bool caseInsensitive)
        {
            _cc = new RegexCharClass();

            if (not)
            {
                if (ch > 0)
                {
                    _cc.AddRange('\0', (char)(ch - 1));
                }
                if (ch < 0xFFFF)
                {
                    _cc.AddRange((char)(ch + 1), '\uFFFF');
                }
            }
            else
            {
                _cc.AddRange(ch, ch);
            }

            _caseInsensitive = caseInsensitive;
            _nullable        = nullable;
        }