RegExpose.Nodes.Character.CharacterClassShorthand.GetNegated C# (CSharp) Method

GetNegated() private static method

private static GetNegated ( string value ) : bool
value string
return bool
        private static bool GetNegated(string value)
        {
            switch (GetShorthand(value))
            {
                case Shorthand.Digit:
                case Shorthand.WordCharacter:
                case Shorthand.Whitespace:
                    return false;
                case Shorthand.NonDigit:
                case Shorthand.NonWordCharacter:
                case Shorthand.NonWhitespace:
                    return true;
                default:
                    throw new InvalidOperationException("Invalid shorthand value.");
            }
        }