add method

This commit is contained in:
Looly
2021-10-26 22:35:04 +08:00
parent a77dce46cd
commit 32684b2d5c
4 changed files with 52 additions and 9 deletions

View File

@@ -2857,10 +2857,10 @@ public class CharSequenceUtil {
len += str.length();
}
if (isNotEmpty(prefix)) {
len += str.length();
len += prefix.length();
}
if (isNotEmpty(suffix)) {
len += str.length();
len += suffix.length();
}
StringBuilder sb = new StringBuilder(len);
if (isNotEmpty(prefix) && false == startWith(str, prefix)) {