I need to count same letters in a word. For example: apple is my word and first I found whether 'a' exists in this letter or not. After that I want to count the number of 'a' in that word but I couldn't do that. This is my code which finds the specific letter;
if([originalString rangeOfString:compareString].location==NSNotFound)
{
NSLog(@"Substring Not Found");
}
else
{
NSLog(@"Substring Found Successfully");
}
originalString is a word which I took from my database randomly. So, how to count? Thanks for your help.