gpt4 book ai didi

iphone - 如何在 objective-c 中找到数组索引值

转载 作者:可可西里 更新时间:2023-11-01 05:00:43 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Getting Index of an Object from NSArray?

我有一个数组和一个字符串。数组名称是“Array1”,字符串名称是“String”,现在我在“Array1”中的值下面有这个。

"array1 = [[NSMutableArray alloc]initWithObjects:@"A",@"b",@"c",@"d",@"e", nil];"

我的字符串值为"A"

现在我想比较这些字符串和数组。我想显示数组索引值。

我该怎么做。请有人帮助我。提前致谢。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com