使用字符串

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];
 
 

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter