Re: string replace function



i created a patch
https://bugzilla.gnome.org/show_bug.cgi?id=665763

how do i go about getting it reviewed?



On Tue, Dec 6, 2011 at 10:05 AM, Kevin Anthony <kevin s anthony gmail com>wrote:

g_strreplace("Source String ABCDEFG","CDE","XYZ") would return

"Source String ABXYZFG"

g_strnreplace("Source String x x x x x x","x","y",2) would return

"Source String y y x x x x"

i understand there are other functions that sort of do this, but i makes
sense, i think, to have an actual search and replace function.



On Tue, Dec 6, 2011 at 5:04 AM, Stefan Sauer <ensonic hora-obscura de>wrote:

On 12/06/2011 03:56 AM, Kevin Anthony wrote:
I was thinking of making a g_strrpl and g_strnrpl
The first one takes (gchar*,gchar*) and returns a gchar* in which the
all
instances of the second gchar* will be found and replaced in the first
gchar*.
replaced by what? g_strcannon can be used for some of the user cases
maybe. Also g_strrpl is not a good name, it would be better to just call
it g_strreplace.

Stefan
The second one is the same, but only replaces the first n instances.

But what i would like to know, is if i write this, and include it in the
glib/gstrfuncs.c in a patch, would it be included.


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




--
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/




-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]