mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 04:09: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:
@@ -28,6 +28,7 @@
|
||||
#define __G_STRING_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/gunicode.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -79,10 +80,14 @@ GString* g_string_append_len (GString *string,
|
||||
gssize len);
|
||||
GString* g_string_append_c (GString *string,
|
||||
gchar c);
|
||||
GString* g_string_append_unichar (GString *string,
|
||||
gunichar wc);
|
||||
GString* g_string_prepend (GString *string,
|
||||
const gchar *val);
|
||||
GString* g_string_prepend_c (GString *string,
|
||||
gchar c);
|
||||
GString* g_string_prepend_unichar (GString *string,
|
||||
gunichar wc);
|
||||
GString* g_string_prepend_len (GString *string,
|
||||
const gchar *val,
|
||||
gssize len);
|
||||
@@ -92,6 +97,9 @@ GString* g_string_insert (GString *string,
|
||||
GString* g_string_insert_c (GString *string,
|
||||
gssize pos,
|
||||
gchar c);
|
||||
GString* g_string_insert_unichar (GString *string,
|
||||
gssize pos,
|
||||
gunichar wc);
|
||||
GString* g_string_erase (GString *string,
|
||||
gsize pos,
|
||||
gsize len);
|
||||
|
Reference in New Issue
Block a user