修复CsvParser中对正文中双引号处理逻辑问题

This commit is contained in:
Looly
2024-07-31 01:14:39 +08:00
parent 967f3d2ca0
commit 1a0ae09047
3 changed files with 60 additions and 19 deletions

View File

@@ -2645,7 +2645,7 @@ public class CharSequenceUtil extends StrValidator {
if (isEmpty(str)) {
return toStringOrNull(str);
}
if (str.charAt(0) == prefix && str.charAt(str.length() - 1) == suffix) {
if (isWrap(str, prefix, suffix)) {
return sub(str, 1, str.length() - 1);
}
return str.toString();