mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-30 18:12:32 +02:00
Fixing for emoji families
This commit is contained in:
@@ -41,7 +41,8 @@ fun String.firstFullChar(): String {
|
||||
start = next
|
||||
} else {
|
||||
// If join, searches for the next char
|
||||
if (codePoint == 0x200D) {
|
||||
if (codePoint == 0xFE0F) {
|
||||
} else if (codePoint == 0x200D) {
|
||||
isInJoin = true
|
||||
} else {
|
||||
// stops when two chars are not joined together
|
||||
|
@@ -49,4 +49,9 @@ class CharsetTest {
|
||||
fun testTeacher() {
|
||||
Assert.assertEquals("\uD83E\uDDD1\uD83C\uDFFF\u200D\uD83C\uDFEB", "\uD83E\uDDD1\uD83C\uDFFF\u200D\uD83C\uDFEBasdf".firstFullChar())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testVariation() {
|
||||
Assert.assertEquals("\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68", "\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68ddd".firstFullChar())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user