mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add method
This commit is contained in:
@@ -284,4 +284,12 @@ public class CharSequenceUtilTest {
|
||||
// Expect common suffix: { space * 10 }
|
||||
Assertions.assertEquals(CharSequenceUtil.repeat(CharSequenceUtil.SPACE, 10), CharSequenceUtil.commonSuffix(str1, str2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void codeLengthTest() {
|
||||
String a = "🍒🐽";
|
||||
final int i = StrUtil.codeLength(a);
|
||||
Assertions.assertEquals(4, a.length());
|
||||
Assertions.assertEquals(2, i);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user