Possible Duplicate:
Getting Index of an Object from NSArray?
I have one Array and one string. Array name is "Array1", String name is "String", Now i have this below Values in "Array1".
"array1 = [[NSMutableArray alloc]initWithObjects:@"A",@"b",@"c",@"d",@"e", nil];"
My String value is "A"
Now i want to compare these string and array. And i want to display the Array index value.
How can i do this. Please somebody help me. Thanks in advance.
i'm not sure if this is what you're looking for but maybe:
int index = [array1 indexOfObject:String];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With