aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-10-24 12:18:55 +0200
committerMattias Andrée <maandree@operamail.com>2014-10-24 12:18:55 +0200
commitbe740788da3916064e644f2e39f689ab95ccd0d4 (patch)
tree0e50129c801df98aa672cf41173f03eb9d609321 /src
parentmds-kbdc: string_encode (diff)
downloadmds-be740788da3916064e644f2e39f689ab95ccd0d4.tar.gz
mds-be740788da3916064e644f2e39f689ab95ccd0d4.tar.bz2
mds-be740788da3916064e644f2e39f689ab95ccd0d4.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/string.h8
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