Skip to content

Commit

Permalink
make PatternUtils.escape public (#994)
Browse files Browse the repository at this point in the history
Can be useful for more precisely mapping fixed strings
to a regex pattern.
  • Loading branch information
manolama authored Sep 20, 2022
1 parent 811f9c7 commit c4143db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static String expandEscapedChars(String str) {
* as a regular expression.
*/
@SuppressWarnings("PMD.NcssCount")
static String escape(String str) {
public static String escape(String str) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < str.length(); ++i) {
char c = str.charAt(i);
Expand Down

0 comments on commit c4143db

Please sign in to comment.