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

GetShorthand() private static method

private static GetShorthand ( string value ) : Shorthand
value string
return Shorthand
        private static Shorthand GetShorthand(string value)
        {
            switch (value)
            {
                case @"\d":
                    return Shorthand.Digit;
                case @"\D":
                    return Shorthand.NonDigit;
                case @"\w":
                    return Shorthand.WordCharacter;
                case @"\W":
                    return Shorthand.NonWordCharacter;
                case @"\s":
                    return Shorthand.Whitespace;
                case @"\S":
                    return Shorthand.NonWhitespace;
                default:
                    throw new InvalidOperationException("Invalid shorthand value: " + value);
            }
        }