Best way to copy a GString object

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

 



What is the best way to copy a GString object in glib (plain c)?  There
doesn't seem to be any copy constructor.  My current guess is to use
g_string_new_len(src->str,src-len).  However that won't put in a
terminating null character which I'd like to have so it will be easier
to manipulate this string later.  g_string_new() seems to be what I
need, except that I can't guarantee that the input GString will have a
terminating null in it.

Michael

-- 
Michael Torrie <torriem@xxxxxxxxxxxx>
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux