Created
August 25, 2009 06:35
-
-
Save kyanny/174511 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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