NSString *url = @"http://stackoverflow.com/questions/ask"; How can I get the character position of the 4th "/" ?