public bool IsMatchAny(IEnumerable <char> characters)
 {
     return(characters.Contains(_character, CharComparer.Get(_comparison)));
 }
        public static ICharactersRangeDefinition CreateMatching(IEnumerable <char> characters, StringComparison comparison = StringComparison.Ordinal)
        {
            Guard.ArgNotNull(characters, nameof(characters));
            var charSet = comparison != StringComparison.Ordinal ? new HashSet <char>(characters, CharComparer.Get(comparison)) : new HashSet <char>(characters);

            if (charSet.Count == 0)
            {
                return(Empty);
            }

            if (charSet.Count == 1)
            {
                return(CreateMatching(charSet.Single(), comparison));
            }

            return(new CharSet(charSet.AsReadOnly()));
        }
 public bool IsMatch(char character)
 {
     return(CharComparer.Get(_comparison).Equals(_character, character));
 }