使用字符串
erhuabushuo
posted @ 2013年3月12日 15:06
in Objective C
, 1734 阅读
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];
2020年9月06日 22:59
Great post.