refine deleteWhitespace (#569)

This commit is contained in:
XenoAmess 2020-12-06 01:30:42 +08:00 committed by GitHub
parent eaebffb59a
commit 5a17dc7ad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1614,6 +1614,9 @@ public static String deleteWhitespace(final String str) {
if (count == sz) {
return str;
}
if (count == 0) {
return EMPTY;
}
return new String(chs, 0, count);
}