c32rtomb method

List<int> c32rtomb(
  1. char32_t c32
)

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

Implementation

List<int> c32rtomb(char32_t c32) {
  String str = String.fromCharCode(c32);
  return utf8.encode(str);
}