From b005287430098b40e4a61324eb2732674cf4793f Mon Sep 17 00:00:00 2001 From: Dominic Fellbaum Date: Sat, 23 Sep 2023 00:28:37 +0200 Subject: [PATCH] Fix README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4236c20..54c105a 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ String text = EmojiManager.removeAllEmojis("Hello 😀 World 👍"); // "Hello #### Remove specific emojis from a string ```java -String text = EmojiManager.removeEmojis("Hello 😀 World 👍",Collections.singletonList("😀")); // "Hello World 👍" +String text = EmojiManager.removeEmojis("Hello 😀 World 👍", EmojiManager.getEmoji("😀").orElseThrow(RuntimeException::new)); // "Hello World 👍" ``` #### Replace all emojis in a string @@ -121,7 +121,7 @@ String text = EmojiManager.replaceAllEmojis("Hello 😀 World 👍", Emoji::getH #### Replace specific emojis in a string ```java -String text = EmojiManager.replaceEmojis("Hello 😀 World 👍","",Collections.singletonList("😀")); // "Hello World 👍" +String text = EmojiManager.replaceEmojis("Hello 😀 World 👍", "", EmojiManager.getEmoji("😀").orElseThrow(RuntimeException::new)); // "Hello World 👍" ``` ### Emoji Object