mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-11 21:39:26 +02:00
Fixing for emoji families
This commit is contained in:
parent
64d96ab1d7
commit
84600c016e
@ -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())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user