1、NSString *str1 = [ [NSString alloc] intWithString:@"MY"];
[ str1 release];
2、
NSString *str2 = [ [NSString alloc] intWithUTF8String:"MY"];
[ str2 release];
3、
NSString *str3 = [ [NSString alloc] intWithFormat::@" %d",5];
[ str3 release];
4、NSString *str4 = [ [NSString stringWithString:@"MY"];
5、
NSString *str5 = [ [NSString stringWithUTF8String:"MY"];
6、
NSString *str6 = [ [NSString stringWithFormat::@" %d",5];
7、
NSError *error;
NSString *str6 = [ [NSString stringWithContentsOfFile:@"/User/apple/abc.txt" encoding: NSUTF8StringEncoding error : &error] ;
if( error)
{
NSLog(@"没有提取内容成功");
}