Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by code ( 13 years ago )
NSMutableArray *array = [[NSMutableArray alloc]initWithObjects:@"A",@"B",@"C",@"A",@"D", nil];
    NSString *string = @"A";
    int index = [array indexOfObject:string];
    NSLog(@"index : %d", index);

I have use this code to fine the Array position value. It is working fine for only one position. if i get same values again it is not to finding. So how can i display the position of array. if i get same value again. For "e.x"@"A",@"B",@"C",@"A",@"D", here i have 2 A values. it shows First A value. Now i want to show first and fourth A position. How can i do this. Please help me.

 

Revise this Paste

Your Name: Code Language: