We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2c542c commit bf8a01eCopy full SHA for bf8a01e
1 file changed
src/main/java/ssj/algorithm/string/StringUntil.java
@@ -130,6 +130,9 @@ public static String replaceSpace(String s) {
130
}
131
132
public static String compress(String str) {
133
+ if (str == null || str.isEmpty()) {
134
+ return str;
135
+ }
136
StringBuilder sb = new StringBuilder(str.length());
137
int cur = 0;
138
while (cur < str.length()) {
0 commit comments