Sam
11/19/2018, 2:59 AM@Test
fun `The number of bytes in a euro is three`(){
//count and length return 1 but a euro symbol is a multibyte character
assertEquals(3, "€".count, "Wrong number of bytes for a Euro.")
}serebit
11/19/2018, 4:04 AMString.toUtf8Bytes() extension function and call size on the result.msink
11/19/2018, 4:09 AMkotlin.native.toUtf8()
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native/to-utf8.htmlSam
11/19/2018, 4:12 AM