示例#1
0
 public static Parser <string, char> CaseInsensitiveString(string str) =>
 CollectionParsers.List <string, char> (str,
                                        (c1, c2) => char.ToLower(c1) == char.ToLower(c2))
 .Expect(str + " (case insensitive)");
示例#2
0
 /// <summary>
 /// Parse a given string.
 /// </summary>
 public static Parser <string, char> String(string str) =>
 CollectionParsers.List <string, char> (str, (c1, c2) => c1 == c2)
 .Expect(str);