std.utf.char

std.utf

char(...) -> str, err

Convert one or more Unicode codepoints to a UTF-8 string

Converts each integer argument (a Unicode codepoint) to its UTF-8 byte representation and concatenates the results. Accepts any value in the range 0–0x10FFFF (the full Unicode range). Returns nil and an error message for any out-of-range codepoint.

Port of Lua-5.1-UTF-8 by willox.