From be740788da3916064e644f2e39f689ab95ccd0d4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 24 Oct 2014 12:18:55 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/string.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2