Skip to content

Commit

Permalink
Merge pull request #900 from PENEKhun
Browse files Browse the repository at this point in the history
* gh-900:
  Avoid substring creation when string part to StringBuilder

Closes gh-900
  • Loading branch information
wilkinsona committed Nov 14, 2023
2 parents a977568 + 2e24582 commit bde93fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private String modify(String input) {
while (matcher.find()) {
for (int i = 1; i <= matcher.groupCount(); i++) {
if (matcher.start(i) >= 0) {
builder.append(input.substring(previous, matcher.start(i)));
builder.append(input, previous, matcher.start(i));
}
if (matcher.start(i) >= 0) {
previous = matcher.end(i);
Expand Down

0 comments on commit bde93fe

Please sign in to comment.