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

SingletonChar() static private method

static private SingletonChar ( String set ) : char
set String
return char
        internal static char SingletonChar(String set) {
            Debug.Assert(IsSingleton(set) || IsSingletonInverse(set), "Tried to get the singleton char out of a non singleton character class");
            return set[SETSTART];
        }

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::SingletonChar