Re: g_list_find
- From: Eloy Froufe <efroufe igalia com>
- To: gtk-app-devel-list gnome org
- Subject: Re: g_list_find
- Date: Tue, 27 Apr 2004 11:34:16 +0200
O Lun, 2004-04-26 ás 16:52, Tim Müller escribiu:
On Monday 26 April 2004 15:25, Johnny wrote:
I have to find in a GList a string,can g_list_find do it?
g_list_find() will only work if you know the exact pointer value of the string
you inserted into the list, it will not check whether the contents, ie. the
strings itself, are the same (so it's most likely not what you want).
GList *node;
node = g_list_find_custom (list,
"Find this",
(GCompareFunc) strcmp);
or
node = g_list_find_custom (list,
"Find this",
(GCompareFunc) g_ascii_strcasecmp);
should do the trick.
Does happen the same with GNode instead of GList when using g_node_find?
How can i find a string in a GNode of strings?
Greetings.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]