Пример #1
0
        /// <summary>
        /// Parses a single character except for those in the given parameters
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public static Parser <char> CharExcept(IEnumerable <char> c)
        {
            var chars = c as char[] ?? c.ToArray();

            return(CharExcept(chars.Contains, StringExtensions.Join("|", chars)));
        }
Пример #2
0
 /// <summary>
 /// Parses a single character except for those in c
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public static Parser <char> CharExcept(string c)
 {
     return(CharExcept(c.ToEnumerable().Contains, StringExtensions.Join("|", c.ToEnumerable())));
 }
Пример #3
0
 /// <summary>
 /// Parse a single character of any in c
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public static Parser <char> Chars(params char[] c)
 {
     return(Char(c.Contains, StringExtensions.Join("|", c)));
 }