summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-08-24 15:27:23 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-08-24 15:27:23 +0000
commit78f3f18c46e44823a61c618ae91aed4b427014ec (patch)
treeb0cc2115339c2da86a8e6e37dda5ebb8cf3e8387 /docs
parentfaca80d619fb89332d25d32369c80026ef37ac2f (diff)
Patch from Darin Adler to restore Glib-1.2 handling of empty strings, and
Fri Aug 24 11:15:46 2001 Owen Taylor <otaylor@redhat.com> * glib/gstrfuncs.c docs/Changes-2.0.txt: Patch from Darin Adler to restore Glib-1.2 handling of empty strings, and to fix off-by-one with @max_tokens. (#57663). Doc improvements. * tests/strfunc-test.c: Change tests to correspond to new behavior of g_strsplit().
Diffstat (limited to 'docs')
-rw-r--r--docs/Changes-2.0.txt8
-rw-r--r--docs/reference/glib/tmpl/string_utils.sgml20
2 files changed, 14 insertions, 14 deletions
diff --git a/docs/Changes-2.0.txt b/docs/Changes-2.0.txt
index d9fc04177..28b888977 100644
--- a/docs/Changes-2.0.txt
+++ b/docs/Changes-2.0.txt
@@ -32,3 +32,11 @@
* GDate now works in UTF-8, not in the current locale. If you
want to use it with the encoding of the locale, you need
to convert strings using g_locale_to_utf8 first.
+
+* g_strsplit() has been fixed to:
+
+ - include trailing empty tokens, rather than stripping them
+ - split into a maximum of @max_tokens tokens, rather than
+ @max_tokens + 1
+
+ Code depending on either of these bugs will need to be fixed.
diff --git a/docs/reference/glib/tmpl/string_utils.sgml b/docs/reference/glib/tmpl/string_utils.sgml
index 43a87005b..3dc908068 100644
--- a/docs/reference/glib/tmpl/string_utils.sgml
+++ b/docs/reference/glib/tmpl/string_utils.sgml
@@ -358,20 +358,12 @@ nesting such as g_strup (g_strcanon (str)).
<!-- ##### FUNCTION g_strsplit ##### -->
<para>
-Splits a string into a maximum of @max_tokens pieces, using the given
-@delimiter. If @max_tokens is reached, the last piece contains the
-remainder of @string. If @string is an empty string, then the resulting
-string array has no elements.
-</para>
-
-@string: a string to split.
-@delimiter: a string which specifies the places at which to split the string.
-The delimiter is not included in any of the resulting strings, unless
-max_tokens is reached.
-@max_tokens: the maximum number of pieces to split @string into. If this is
-less than 1, the string is split completely.
-@Returns: a newly-allocated NULL-terminated array of strings. Use g_strfreev()
-to free it.
+</para>
+
+@string:
+@delimiter:
+@max_tokens:
+@Returns:
<!-- ##### FUNCTION g_strfreev ##### -->