新增数据库Wrapper支持反解

This commit is contained in:
Looly
2024-03-28 16:08:17 +08:00
parent 2e372534bd
commit 6854e342cf
7 changed files with 96 additions and 58 deletions

View File

@@ -2212,6 +2212,18 @@ public class CharSequenceUtil extends StrValidator {
return emptyIfNull(prefix).concat(emptyIfNull(str)).concat(emptyIfNull(suffix));
}
/**
* 包装指定字符串
*
* @param str 被包装的字符串
* @param prefix 前缀
* @param suffix 后缀
* @return 包装后的字符串
*/
public static String wrap(final CharSequence str, final char prefix, final char suffix) {
return prefix + emptyIfNull(str) + suffix;
}
/**
* 使用单个字符包装多个字符串
*
@@ -2531,7 +2543,7 @@ public class CharSequenceUtil extends StrValidator {
return str.toString().concat(repeatByLength(padStr, length - strLen));
}
// region
// endregion
// region ----- center
@@ -2628,7 +2640,7 @@ public class CharSequenceUtil extends StrValidator {
}
// endregion
// ------------------------------------------------------------------------ count
// region ----- count
/**
* 统计指定内容中包含指定字符串的数量<br>
@@ -2684,6 +2696,7 @@ public class CharSequenceUtil extends StrValidator {
}
return count;
}
// endregion
// region ----- compare
@@ -3724,6 +3737,7 @@ public class CharSequenceUtil extends StrValidator {
str2.substring(strLength - suffixLength));
}
// region ----- join
/**
* 以 conjunction 为分隔符将多个对象转换为字符串
*
@@ -3750,6 +3764,8 @@ public class CharSequenceUtil extends StrValidator {
return CollUtil.join(iterable, conjunction);
}
// endregion
/**
* 检查字符串是否都为数字组成
*