Created
November 20, 2011 06:24
-
-
Save uranusjr/1379881 to your computer and use it in GitHub Desktop.
Test of Unicode character output in NSLog
This file contains 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
// | |
// main.m | |
// test | |
// | |
// Created by uranusjr on 20/11. | |
// Copyright 2011年 __MyCompanyName__. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface ObjectA : NSObject | |
@property (retain) id item; | |
@end | |
@implementation ObjectA | |
@synthesize item; | |
- (NSString *)description | |
{ | |
return [NSString stringWithFormat:@"(%@)", [self item]]; | |
} | |
@end | |
int main (int argc, const char * argv[]) | |
{ | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
ObjectA *obj = [[ObjectA alloc] init]; | |
[obj setItem:@"8月"]; | |
NSLog(@"%@", obj); | |
[pool drain]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment