Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created August 25, 2009 06:35
Show Gist options
  • Save kyanny/174511 to your computer and use it in GitHub Desktop.
Save kyanny/174511 to your computer and use it in GitHub Desktop.
#import <Cocoa/Cocoa.h>
int main(int argc, const char *argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *string;
NSArray *array;
string = @"foo<>bar<>baz";
//string = [[NSString alloc] initWithString:@"foo<>bar<>baz"];
array = [string componentsSeparatedByString:@"<>"];
printf("%d\n", [array count]);
printf("%s\n", [array objectAtIndex:2]);
//NSLog(@"%d", [array count]);
[pool release];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment