System.Text.RegularExpressions.RegexCharClass.IsSingleton C# (CSharp) Method

IsSingleton() static private method

static private IsSingleton ( String set ) : bool
set String
return bool
        internal static bool IsSingleton(String set) {
            if (set[FLAGS] == 0 && set[CATEGORYLENGTH] == 0 && set[SETLENGTH] == 2 && !IsSubtraction(set) &&
                (set[SETSTART] == Lastchar || set[SETSTART]+1 == set[SETSTART+1]))
                return true;
            else
                return false;
        }

Usage Example

Esempio n. 1
0
 internal RegexNode ReduceSet()
 {
     if (RegexCharClass.IsEmpty(this._str))
     {
         this._type = 0x16;
         this._str  = null;
     }
     else if (RegexCharClass.IsSingleton(this._str))
     {
         this._ch    = RegexCharClass.SingletonChar(this._str);
         this._str   = null;
         this._type += -2;
     }
     else if (RegexCharClass.IsSingletonInverse(this._str))
     {
         this._ch    = RegexCharClass.SingletonChar(this._str);
         this._str   = null;
         this._type += -1;
     }
     return(this);
 }
All Usage Examples Of System.Text.RegularExpressions.RegexCharClass::IsSingleton