Try this: if ([myString hasPrefix:@"http"]).
By the way, your test should be != NSNotFound instead of == NSNotFound. But say your URL is ftp://my_http_host.com/thing, it’ll match but shouldn’t.
Try this: if ([myString hasPrefix:@"http"]).
By the way, your test should be != NSNotFound instead of == NSNotFound. But say your URL is ftp://my_http_host.com/thing, it’ll match but shouldn’t.