Function rune_to_utf8

Function Documentation

string rune_to_utf8(string dest, rune ch)

Single UCS-4 rune to UTF-8 string. dest should allocate 4 bytes, or 5 if it is desired to NUL-terminate.

Return

Slice of dest with correct length.

Parameters
  • [out] dest: Empty string structure to hold UTF-8 bytes.

  • [in] ch: Single UCS-4 character / rune.