mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-04 04:39:20 +02:00
Add functions to insert a unichar as UTF-8, since this is reasonably
Fri Jul 13 19:20:06 2001 Owen Taylor <otaylor@redhat.com> * glib/gstring.c (g_string_insert/append/prepend_unichar): Add functions to insert a unichar as UTF-8, since this is reasonably common. * glib/gutf8.c glib/gunicode.h (g_utf8_get_char_validated): New function exposing iterating through possibly invalid/incomplete UTF-8 to unicode to the outside world. * glib/gutf8.c (g_utf8_get_char_extended): Fix max_len argument to be gssize, not gsize.
This commit is contained in:
@@ -167,7 +167,10 @@ GLIB_VAR char g_utf8_skip[256];
|
||||
|
||||
#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)])
|
||||
|
||||
gunichar g_utf8_get_char (const gchar *p);
|
||||
gunichar g_utf8_get_char (const gchar *p);
|
||||
gunichar g_utf8_get_char_validated (const gchar *p,
|
||||
gssize max_len);
|
||||
|
||||
gchar* g_utf8_offset_to_pointer (const gchar *str,
|
||||
glong offset);
|
||||
glong g_utf8_pointer_to_offset (const gchar *str,
|
||||
|
Reference in New Issue
Block a user