From cfa2f7b625ed645257897f94f258832f076ee6b0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 18 Sep 2008 13:18:16 +0200 Subject: added support for wide characters This patch was taken from bug 476, author unknown (http://www.musicpd.org/mantis/view.php?id=476). It changes the definition of my_strlen(): instead of returning the number of UTF-8 characters, it counts the number of terminal cells occupied by a string. --- src/support.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/support.h') diff --git a/src/support.h b/src/support.h index b80b9c8a2..3377f9a80 100644 --- a/src/support.h +++ b/src/support.h @@ -28,8 +28,11 @@ void charset_init(gboolean disable); char *utf8_to_locale(const char *str); char *locale_to_utf8(const char *str); -/* number of characters in str */ +/** + * Returns the number of terminal cells occupied by this string. + */ size_t my_strlen(const char *str); + /* number of bytes in str */ size_t my_strsize(char *str); -- cgit v1.2.3