Find the position of a string in an array of string with the GLib

Posted by e1s on Stack Overflow See other posts from Stack Overflow or by e1s
Published on 2010-05-25T23:00:58Z Indexed on 2010/05/28 10:32 UTC
Read the original article Hit count: 219

Filed under:
|
|

Hello, I have an array of string, like:

char **strings = {"str1", "str2"};

And i would like to know if there is a function in the glib to find the position of a string in this array.

I guess i could just do g_strcmp0 in a for() loop, but there may be a better way to do it.

Thanks

© Stack Overflow or respective owner

Related posts about arrays

Related posts about string