Cyclone Scheme
0.28.0
|
◆ Cyc_utf8_encode()
This function takes one or more 32-bit chars and encodes them as an array of UTF-8 bytes. FROM: https://www.cprogramming.com/tutorial/utf8.c
dest will only be '\0'-terminated if there is enough space. this is for consistency; imagine there are 2 bytes of space left, but the next character requires 3 bytes. in this case we could NUL-terminate, but in general we can't when there's insufficient space. therefore this function only NUL-terminates if all the characters fit, and there's space for the NUL as well. the destination string will never be bigger than the source string. |