Re: patch to change behavior of g_strsplit on empty string back to 1.2 behavior
- From: Darin Adler <darin bentspoon com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: patch to change behavior of g_strsplit on empty string back to 1.2 behavior
- Date: Wed, 18 Jul 2001 14:25:17 -0700
On Wednesday, July 18, 2001, at 02:12 PM, Owen Taylor wrote:
Well, there is clearly one thing missing here ... the corresponding
change to the documentation (docs/glib/tmpl/string_utils.sgml) :-)
That needs a comment to the point:
"The result of a splitting an empty string is an empty vector"
Since there is no way you could logically deduce this.
OK. I'll look at that and make a new patch that does that.
If you look at the docs, the documented behavior is supposed to be that
the trailing portion from the part past max_delimiter go into the last
token. That is,
"w,x,y,z", ",", 2 => "w" "x,y,z"
The code in GLib stable didn't do that either, however, what it produced
was
"w,x,y,z", ",", 2 => "w" "x" "y,z"
OK. I'll update the test I wrote to expect that behavior and fix the
implementation to produce that behavior, and then put a new patch up in
the bug report and on the list.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]