/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#import <Cocoa/Cocoa.h> - (BOOL) isURL; @end #import "NSString-Utilities.h" - (BOOL) isURL { if ( [self hasPrefix:@"http://"] ) return YES; else return NO; } @end // To use this: if ( [string1 isURL] ) NSLog (@"string1 is a URL"); if ( [string2 isURL] ) NSLog (@"string2 is a URL");
URL: http://www.cocoadevcentral.com/d/learn_objectivec/
Comments
