Skip to content

Commit

Permalink
Remove redundant while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasterover9000 committed Dec 15, 2023
1 parent 68c238f commit f8e2401
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,11 @@ public static String escapeString(String toEscape) {
int i = 0;
while (i < length) {

while (i < length) {
char c = toEscape.charAt(i++);
if (needsUnicodeEscape(c)) {
unicodeEscape(c, charVector);
} else {
charVector.add(c);
}
char c = toEscape.charAt(i++);
if (needsUnicodeEscape(c)) {
unicodeEscape(c, charVector);
} else {
charVector.add(c);
}
}

Expand Down

0 comments on commit f8e2401

Please sign in to comment.