作者 crossoverJie

:white_check_mark: Adding tests.

@@ -207,9 +207,11 @@ public class CommonTest { @@ -207,9 +207,11 @@ public class CommonTest {
207 @Test 207 @Test
208 public void emoji2(){ 208 public void emoji2(){
209 String emostring ="😂"; 209 String emostring ="😂";
210 - System.out.println(emostring.length());  
211 - System.out.println(new StringBuilder().appendCodePoint(  
212 - emostring.codePointAt(emostring.offsetByCodePoints(0, 1))).toString()); 210 +
  211 + String face_with_tears_of_joy = emostring.replaceAll("\uD83D\uDE02", "face with tears of joy");
  212 + System.out.println(face_with_tears_of_joy);
  213 +
  214 + System.out.println("======" + face_with_tears_of_joy.replaceAll("face with tears of joy","\uD83D\uDE02"));
213 } 215 }
214 216
215 } 217 }