Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 17th, 2018 56 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. - (NSString *)getFirstImage:(NSString *)html {
  2.     NSString *tempText = [[NSString alloc]initWithFormat:@""];
  3.     NSScanner *pageScanner = [NSScanner scannerWithString:html];
  4.     [pageScanner setCaseSensitive:NO];
  5.     [pageScanner setCharactersToBeSkipped:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
  6.     [pageScanner scanUpToString:@"<img " intoString:nil];
  7.     [pageScanner scanString:@"<img " intoString:nil];
  8.     [pageScanner scanUpToString:@"src=\"" intoString:nil];
  9.     [pageScanner scanString:@"src=\"" intoString:nil];
  10.     [pageScanner scanUpToString:@"\"" intoString:&tempText];
  11.     return tempText;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top