SirNapkin1334
02/11/2022, 1:27 AMString
are deprecated in Kotlin/JS!ephemient
02/11/2022, 1:42 AMephemient
02/11/2022, 1:46 AMjs("String.fromCodePoint").apply(null, codepoints).unsafeCast<String>()
SirNapkin1334
02/11/2022, 1:51 AMephemient
02/11/2022, 1:53 AMbuildString {
for (codepoint in codepoints) {
if (codepoint and 0xFFFF.inv() == 0) {
append(codepoint.toChar())
} else {
append((0xD800 or (codepoint and 0xFFC00 shr 10)).toChar())
append((0xDC00 or (codepoint and 0x3FF)).toChar())
}
}
}
would be cross-platformSirNapkin1334
02/11/2022, 1:54 AMephemient
02/11/2022, 1:56 AMephemient
02/11/2022, 1:56 AM(codepoint - 0x10000)
ephemient
02/11/2022, 1:57 AMSirNapkin1334
02/11/2022, 2:02 AM