mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add support charpoint
This commit is contained in:
parent
78e30def67
commit
685925cd26
@ -8,6 +8,7 @@
|
||||
### 🐣新特性
|
||||
* 【db 】 优化Condition参数拆分(pr#2046@Github)
|
||||
* 【core 】 优化ArrayUtil.isAllEmpty性能(pr#2045@Github)
|
||||
* 【core 】 CharSequenceUtil.replace方法支持增补字符(pr#2041@Github)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【http 】 HttpUtil重定向次数失效问题(issue#I4O28Q@Gitee)
|
||||
|
@ -3570,7 +3570,8 @@ public class CharSequenceUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换指定字符串的指定区间内字符为固定字符
|
||||
* 替换指定字符串的指定区间内字符为固定字符<br>
|
||||
* 此方法使用{@link String#codePoints()}完成拆分替换
|
||||
*
|
||||
* @param str 字符串
|
||||
* @param startInclude 开始位置(包含)
|
||||
@ -3583,7 +3584,7 @@ public class CharSequenceUtil {
|
||||
if (isEmpty(str)) {
|
||||
return str(str);
|
||||
}
|
||||
String originalStr = str(str);
|
||||
final String originalStr = str(str);
|
||||
int[] strCodePoints = originalStr.codePoints().toArray();
|
||||
final int strLength = strCodePoints.length;
|
||||
if (startInclude > strLength) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user