@@ -2867,6 +2867,19 @@ public void testToCodePoints() {
28672867 assertArrayEquals (new int [] { 'a' , 'b' , 'c' }, StringUtils .toCodePoints ("abc" ));
28682868 }
28692869
2870+ @ Test
2871+ public void testToCodePointsEmoji () {
2872+ assertArrayEquals (ArrayFill .fill (new int [14 ], 129418 ), StringUtils .toCodePoints ("🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊" ));
2873+ assertArrayEquals (new int [] { 128105 , 127995 , 8205 , 128104 , 127995 , 8205 , 128102 , 127995 , 8205 , 128102 , 127995 , 128105 , 127996 , 8205 , 128104 , 127996 ,
2874+ 8205 , 128102 , 127996 , 8205 , 128102 , 127996 , 128105 , 127997 , 8205 , 128104 , 127997 , 8205 , 128102 , 127997 , 8205 , 128102 , 127997 , 128105 , 127998 ,
2875+ 8205 , 128104 , 127998 , 8205 , 128102 , 127998 , 8205 , 128102 , 127998 , 128105 , 127999 , 8205 , 128104 , 127999 , 8205 , 128102 , 127999 , 8205 , 128102 ,
2876+ 127999 , 128105 , 127995 , 8205 , 128104 , 127995 , 8205 , 128102 , 127995 , 8205 , 128102 , 127995 , 128105 , 127996 , 8205 , 128104 , 127996 , 8205 , 128102 ,
2877+ 127996 , 8205 , 128102 , 127996 , 128105 , 127997 , 8205 , 128104 , 127997 , 8205 , 128102 , 127997 , 8205 , 128102 , 127997 , 128105 , 127998 , 8205 , 128104 ,
2878+ 127998 , 8205 , 128102 , 127998 , 8205 , 128102 , 127998 , 128105 , 127999 , 8205 , 128104 , 127999 , 8205 , 128102 , 127999 , 8205 , 128102 , 127999 },
2879+ StringUtils .toCodePoints (
2880+ "👩🏻👨🏻👦🏻👦🏻👩🏼👨🏼👦🏼👦🏼👩🏽👨🏽👦🏽👦🏽👩🏾👨🏾👦🏾👦🏾👩🏿👨🏿👦🏿👦🏿👩🏻👨🏻👦🏻👦🏻👩🏼👨🏼👦🏼👦🏼👩🏽👨🏽👦🏽👦🏽👩🏾👨🏾👦🏾👦🏾👩🏿👨🏿👦🏿👦🏿" ));
2881+ }
2882+
28702883 /**
28712884 * Tests {@link StringUtils#toEncodedString(byte[], Charset)}
28722885 *
0 commit comments