NSString类的实现

+ (id)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding;

+ (id) stringWithCString: (const char*)nullTerminatedCString

encoding: (NSStringEncoding)encoding

{

NSString  *obj;

obj = [self allocWithZone: NSDefaultMallocZone()];

obj = [obj initWithCString: nullTerminatedCString encoding: encoding];

return AUTORELEASE(obj);

}

你可能感兴趣的:(NSString类的实现)