Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のような文字列の配列があります。
char **strings = {"str1", "str2"};
そして、この配列内の文字列の位置を見つけるための関数がglibにあるかどうかを知りたいです。
for()ループでg_strcmp0を実行できると思いますが、もっと良い方法があるかもしれません。
ありがとう
必要な関数が存在しないため、for ループで実行する必要があります。配列の代わりにa を使用した場合は、 をGList使用できますg_list_index()。
GList
g_list_index()