Does anyone know what is more efficient with regards to speed for finding a character in an NSString or in an NSArray of the same characters?
I want to know which has the best and most efficient algorithm to find the correct value.
I effectively want to find the position of a character in the alphabet. e.g. find the position of "E
" in the alphabet @"ABCDE....XYZ"
or [NSArray arrayWithObjects:@"A",@"B",@"C",@"D",@"E",...,@"X",@"Y",@"Z"];
Which is the better one to search through? NSString or NSArray?