Hi Michael,

Thanks a lot for the idea!! I will use regexp because it will be easier
than doing by hand.

Thanks all!!

El Mon, 29 Sep 2008 08:25:02 -0600
Michael Torrie <[EMAIL PROTECTED]> escribió:

> Perriman wrote:
> > Hi all,
> > 
> >     I'm trying to transform an utf8 string. I have some problems
> > with it because I don't know how to do it or where I can see an
> > example (a tutorial, doc or application).
> > 
> > I need transform this text (in utf8):
> > 
> > gtk_source_completion
> > 
> > to:
> > 
> > GtkSourceCompletion.
> > 
> > I don't know how replace a character or delete a character. Perhaps
> > I need to allocate a gchar* array first and then use g_utf8_strncpy
> > in all _, I don't know. In that case, I don't know how much memory
> > I need to allocate.
> > 
> > Can you help me?
> 
> Would not using the Glib regex routines[1] be the easiest?  Hacking
> stuff with strncpy seems a bit problematic.  In particular you can use
> g_regex_replace.  From what I've read, all the glib regular expression
> routines work in UTF-8 natively.
> 
> [1]
> http://library.gnome.org/devel/glib/stable/glib-Perl-compatible-regular-expressions.html
> 
> 
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to