/// <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))); }
/// <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()))); }
/// <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))); }