We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bb1e17 commit 442213eCopy full SHA for 442213e
mug/src/main/java/com/google/mu/util/Substring.java
@@ -660,6 +660,16 @@ public static Pattern trailing(CharPredicate matcher) {
660
};
661
}
662
663
+ /**
664
+ * Returns a {@code Pattern} that matches the first non-empty sequence of consecutive {@code ch}
665
+ * characters.
666
+ *
667
+ * @since 8.7
668
+ */
669
+ public static Pattern consecutive(char ch) {
670
+ return consecutive(CharPredicate.is(ch));
671
+ }
672
+
673
/**
674
* Returns a {@code Pattern} that matches the first non-empty sequence of consecutive characters
675
* identified by {@code matcher}.
0 commit comments