summaryrefslogtreecommitdiff
path: root/glib.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-02-17 11:57:35 +0000
committerTim Janik <timj@src.gnome.org>2000-02-17 11:57:35 +0000
commitcf24ff7121c1567c6831b8752f7ae02cb15d6e00 (patch)
treee41f34b7169305cc1422da6a14c1e5eb7d8b8bf3 /glib.h
parentb97261860c01d1840ae0270b54eb421a9a62a716 (diff)
downloadglib-cf24ff7121c1567c6831b8752f7ae02cb15d6e00.tar.gz
changed g_str_hash() to a 31 bit version based on a submission by Karl
Thu Feb 17 12:53:44 2000 Tim Janik <timj@gtk.org> * gstring.c: changed g_str_hash() to a 31 bit version based on a submission by Karl Nelson and hand optimized ad absurdum by various people ;) * gstring.c: applied patch from havoc for new gstring functions, added some more sanity checks, coding style fixups. 2000-02-13 Havoc Pennington <hp@pobox.com> * tests/string-test.c (main): Add tests for the new GString features * testglib.c (main): Add tests for the new GString features * gstring.c (g_string_insert_len): New function; insert a given length of string at a given position. (g_string_append): reimplement in terms of g_string_insert_len (g_string_append_len): new function (g_string_insert_c): accept -1 for "pos" arg to mean "append" (g_string_append_c): reimplement in terms of g_string_insert_c (g_string_prepend): reimplement in terms of g_string_insert_len (g_string_prepend_len): new function (g_string_prepend_c): reimplement in terms of g_string_insert_c (g_string_insert): reimplement in terms of g_string_insert_len * glib.h: Declare g_string_insert_len, g_string_append_len, g_string_prepend_len
Diffstat (limited to 'glib.h')
-rw-r--r--glib.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/glib.h b/glib.h
index 84c4170b3..bcbb53da2 100644
--- a/glib.h
+++ b/glib.h
@@ -1825,19 +1825,29 @@ gchar* g_string_chunk_insert_const (GStringChunk *chunk,
GString* g_string_new (const gchar *init);
GString* g_string_sized_new (guint dfl_size);
void g_string_free (GString *string,
- gint free_segment);
-GString* g_string_assign (GString *lval,
+ gboolean free_segment);
+GString* g_string_assign (GString *string,
const gchar *rval);
GString* g_string_truncate (GString *string,
gint len);
+GString* g_string_insert_len (GString *string,
+ gint pos,
+ const gchar *val,
+ gint len);
GString* g_string_append (GString *string,
const gchar *val);
+GString* g_string_append_len (GString *string,
+ const gchar *val,
+ gint len);
GString* g_string_append_c (GString *string,
gchar c);
GString* g_string_prepend (GString *string,
const gchar *val);
GString* g_string_prepend_c (GString *string,
gchar c);
+GString* g_string_prepend_len (GString *string,
+ const gchar *val,
+ gint len);
GString* g_string_insert (GString *string,
gint pos,
const gchar *val);