예제 #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)));
 }