标签:ios nsstring 字符串长度 ios中的字符串
创建一个字符串对象:NSString * str_3 = [[NSString alloc]initWithFormat:@"a = %d %s%@", a, "abcd", @"efg"];//用格式化字符串初始化
NSString * str_1 = [[NSString alloc]initWithUTF8String:"hello world"];//把C的字符串转化为OC的字符串
NSString * str_3 = [[NSString alloc]initWithFormat:@"a = %d %s%@", a, "abcd", @"efg"];//用格式化字符串初始化
[str doubleValue];//将数字串转化成double型
标签:ios nsstring 字符串长度 ios中的字符串
原文地址:http://blog.csdn.net/lu_ca/article/details/46444759