mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix test
This commit is contained in:
@@ -24,6 +24,7 @@ public class IssueI96LWHTest {
|
||||
@Test
|
||||
public void replaceByCodePointTest() {
|
||||
final String str = "\uD83D\uDC46最上方点击蓝字";
|
||||
Assertions.assertArrayEquals(new int[]{128070, 26368, 19978, 26041, 28857, 20987, 34013, 23383}, str.codePoints().toArray());
|
||||
|
||||
// 这个方法里\uD83D\uDC46表示一个emoji表情,使用codePoint之后,一个表情表示一个字符,因此按照一个字符对
|
||||
Assertions.assertEquals("\uD83D\uDC46最上下点击蓝字", StrUtil.replaceByCodePoint(str, 3, 4, "下"));
|
||||
|
Reference in New Issue
Block a user