diff --git a/lib/src/main/java/net/fellbaum/jemoji/EmojiManager.java b/lib/src/main/java/net/fellbaum/jemoji/EmojiManager.java index 3e75851..8edfe27 100644 --- a/lib/src/main/java/net/fellbaum/jemoji/EmojiManager.java +++ b/lib/src/main/java/net/fellbaum/jemoji/EmojiManager.java @@ -526,17 +526,6 @@ public static String replaceEmojis(final String text, Function re return replaceEmojis(text, replacementFunction, Arrays.asList(emojisToReplace)); } - private static int[] stringToCodePoints(String text) { - int[] codePoints = new int[getCodePointCount(text)]; - int j = 0; - for (int i = 0; i < text.length();) { - final int codePoint = text.codePointAt(i); - codePoints[j++] = codePoint; - i += Character.charCount(codePoint); - } - return codePoints; - } - /*public static List testEmojiPattern(final String text) { if (isStringNullOrEmpty(text)) return Collections.emptyList(); diff --git a/lib/src/main/java/net/fellbaum/jemoji/EmojiUtils.java b/lib/src/main/java/net/fellbaum/jemoji/EmojiUtils.java index b0fb6a7..334be1c 100644 --- a/lib/src/main/java/net/fellbaum/jemoji/EmojiUtils.java +++ b/lib/src/main/java/net/fellbaum/jemoji/EmojiUtils.java @@ -28,4 +28,15 @@ public static Optional findEmojiByEitherAlias(final Map map, fin if (secondValue != null) return Optional.of(secondValue); return Optional.empty(); } + + public static int[] stringToCodePoints(String text) { + int[] codePoints = new int[getCodePointCount(text)]; + int j = 0; + for (int i = 0; i < text.length();) { + final int codePoint = text.codePointAt(i); + codePoints[j++] = codePoint; + i += Character.charCount(codePoint); + } + return codePoints; + } }