Search Results

Search found 1 results on 1 pages for 'saywhatman'.

Page 1/1 | 1 

  • How do I remove 3 characters from the end of an NSURL?

    - by saywhatman
    Hey, my first question! I've been able to code up most of this RSS reader without enlisting help (through a lot of searches through stackoverflow!) but I'm stumped here. NSString *urlbase = [[NSString alloc] initWithFormat:[links3 objectAtIndex:indexPath.row]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlbase]]; NSCharacterSet *whitespaces = [NSCharacterSet whitespaceCharacterSet]; NSPredicate *noEmptyStrings = [NSPredicate predicateWithFormat:@"SELF != ''"]; NSArray *parts = [urlbase componentsSeparatedByCharactersInSet:whitespaces]; NSArray *filteredArray = [parts filteredArrayUsingPredicate:noEmptyStrings]; urlbase = [filteredArray componentsJoinedByString:@" "]; NSLog(@"%@ %i" , urlbase, 4353); [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlbase]]; The links3 array is a NSMutableArray with strings. The first few lines work flawlessly in eliminating the space at the beginning each string from that array, which is stored in 'urlbase' so they look fine when they come out. When we NSLog urlbase, we see: http://www.feedzilla.com/r/D7E6204FEDBFE541314B997AAB5D2DF9CBA2EFEE But, when we use: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlbase]] We see: http://www.feedzilla.com/r/D7E6204FEDBFE541314B997AAB5D2DF9CBA2EFEE%0A How can I fix this? Can I remove those tail elements somehow? Thanks!

    Read the article

1