public static Matcher characterBackwardsMatcher(Character c) { return (input, i) -> i == 0 ? -1 : (input.charAt(i - 1) == c.getValue() ? 1 : -1); }
public static Matcher characterMatcher(Character c) { return (input, i) -> input.charAt(i) == c.getValue() ? 1 : -1; }