c16rtomb method

List<int> c16rtomb(
  1. char16_t c16
)

Converts a char16_t to a UTF-8 encoded byte sequence.

Implementation

List<int> c16rtomb(char16_t c16) {
  String str = String.fromCharCode(c16);
  return utf8.encode(str);
}