Unicode: add a g_utf8_substring convenience api

This function is useful in the GTK+ accessibility implementations,
and seems like a nice thing to have around in general.
This commit is contained in:
Matthias Clasen
2011-06-23 21:31:40 -04:00
parent c2b112bc56
commit 9eb65dd3ed
5 changed files with 73 additions and 14 deletions

View File

@@ -312,8 +312,12 @@ gchar* g_utf8_find_next_char (const gchar *p,
gchar* g_utf8_find_prev_char (const gchar *str,
const gchar *p) G_GNUC_PURE;
glong g_utf8_strlen (const gchar *p,
gssize max) G_GNUC_PURE;
glong g_utf8_strlen (const gchar *p,
gssize max) G_GNUC_PURE;
gchar *g_utf8_substring (const gchar *p,
glong start_pos,
glong end_pos) G_GNUC_MALLOC;
/* Copies n characters from src to dest */
gchar* g_utf8_strncpy (gchar *dest,