objective-c:初始化字符串

使用NSString和NSMutableString :
 
NSString *simpleString = @"This is a simple string";
 
NSString *anotherString =
[NSString stringWithString:@"This is another simple string"];
 
NSString *oneMorestring =
[[NSString alloc] initWithString:@"One more!"];
 
NSMutableString *mutableOne =
[NSMutableString stringWithString:@"Mutable String"];
 
NSMutableString *anotherMutableOne =
[[NSMutableString alloc] initWithString:@"A retained one"];
 
NSMutableString *thirdMutableOne =
[NSMutableString stringWithString:simpleString];
posted @ 2012-12-21 17:15  鱼丸粗面  阅读(235)  评论(0编辑  收藏  举报