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 16:32:05 -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.
I put a new patch into the bug report. There are really three things the
patch accomplishes:
1) adds a special case to make empty string be like 1.2 [now seems
questionable to me]
2) changes the rule so that the max_tokens parameter works more like
perl's split parameter [introducing another difference from 1.2 just as I
remove the other!]
3) does various other cleanups
Parts 1 and 2 of the patch may not really be improvements. Maybe we want
neither, maybe we want one but not the other. I've lost my sense of what
would be better in this particular corner of pedantry and trivia. But the
other cleanups in my patch are nice and it would be good to get them in
regardless.
I'll just leave this patch in the bug report (57633) for now, but I'll be
glad to do further work on this if requested.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]