Code style fixes

This commit is contained in:
Roman Zhuravlev 2023-07-24 02:15:15 +05:00
parent 7f662eae04
commit 54203b58e5

4
common/src/main/java/org/zhdev/util/StringUtils.java Executable file → Normal file
View file

@ -128,11 +128,9 @@ public class StringUtils {
public static String escape(String str, String escape, char... chars) { public static String escape(String str, String escape, char... chars) {
StringBuilder builder = new StringBuilder(str); StringBuilder builder = new StringBuilder(str);
for (char c : chars) { for (char c : chars) {
replace(builder, String.valueOf(c), escape + c); replace(builder, String.valueOf(c), escape + c);
} }
return builder.toString(); return builder.toString();
} }
@ -142,11 +140,9 @@ public class StringUtils {
public static String unescape(String str, String escape, char... chars) { public static String unescape(String str, String escape, char... chars) {
StringBuilder builder = new StringBuilder(str); StringBuilder builder = new StringBuilder(str);
for (char c : chars) { for (char c : chars) {
replace(builder, escape + c, c); replace(builder, escape + c, c);
} }
return builder.toString(); return builder.toString();
} }