How do I encode a String in Ceylon as UTF-8 bytes?
value string = "my_string";
[Byte*] bytes = string.______;
import ceylon.buffer.charset {
utf8
}
shared void run() {
value string = "my_string";
List<Byte> bytes = utf8.encode(string);
Byte[] bytesSequence = bytes.sequence(); // in case a List isn’t enough
}