b0unc3 wrote:
> 2009/4/10 Nelson Benítez León <nbenit...@gmail.com>
>> Another way,
>>
>> substring (GString *str, int index, int len)
>> {
>>  return g_string_new_len (str->str, index, MIN (str->len - index, len));
>> }
>>

<snip>

> 
> First of all thanks to everyone who replayed.
> The implementation using g_srtndup looks ok.
> 
> I was wondering why not to add a so simple example in the official docs
> (maybe in the g_strndup explanation).

Maybe because it's completely wrong for UTF-8 strings?

Cheers,

Stef

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

Reply via email to