diff options
Diffstat (limited to 'src/mds-kbdc')
-rw-r--r-- | src/mds-kbdc/string.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mds-kbdc/string.h b/src/mds-kbdc/string.h index 6a5d528..4005655 100644 --- a/src/mds-kbdc/string.h +++ b/src/mds-kbdc/string.h @@ -45,7 +45,13 @@ size_t string_length(const char32_t* restrict string) __attribute__((pure, nonnu */ char32_t* string_decode(const char* restrict string) __attribute__((nonnull)); -/* TODO string_encode */ +/** + * Convert a -1-terminated UTF-32 string to a NUL-terminated Modified UTF-8 string. + * + * @param string The UTF-32 string. + * @return The string in UTF-8, `NULL` on error. + */ +char* string_encode(const char32_t* restrict string) __attribute__((nonnull)); #endif |