摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSMutableString *mustr1=[[NSMutableString alloc]init]; NSMutableString *mu... 阅读全文
posted @ 2016-01-07 09:54 专注博客园三十年 阅读(587) 评论(0) 推荐(0)
摘要: NSMutableString*string=[NSMutableStringstringWithFormat:@"%@",@"123-456-789-000"];//查找“-”NSRangerg=[stringrangeOfString:@"-"]; //找到指定的你要删除的“-”然后在下面进行删... 阅读全文
posted @ 2016-01-07 09:47 专注博客园三十年 阅读(857) 评论(0) 推荐(0)
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSString*str=@"123-456-789-000"; NSString*str1=[str stringByReplacingOccurre... 阅读全文
posted @ 2016-01-07 09:15 专注博客园三十年 阅读(280) 评论(0) 推荐(0)
摘要: //整型转换字符串 进行封装int a=100;NSNumber*intNumberA=[NSNumber NumberWithInit:a];//字符串转换成整型NSString*str1=@"158";NSInterger num1=[str1 integerValue]; 阅读全文
posted @ 2016-01-07 09:00 专注博客园三十年 阅读(481) 评论(0) 推荐(0)
摘要: //定义四个整数类型inta=789;intb=456;intc=123;intd=753;//进行封装NSNumber*intNumberA=[NSNumbernumberWithInt:a];NSNumber*intNumberB=[NSNumbernumberWithInt:b];NSNumb... 阅读全文
posted @ 2016-01-06 22:23 专注博客园三十年 阅读(243) 评论(0) 推荐(0)
摘要: #import 2 3 int main(int argc, const char * argv[]) { 4 @autoreleasepool { 5 //判断字符串前缀 6 NSString *str1=@"iOS-study"; 7 ... 阅读全文
posted @ 2016-01-06 20:46 专注博客园三十年 阅读(1029) 评论(0) 推荐(0)
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //创建字符串常量 NSString *str1=@"char1"; //实例方法创建 NSStri... 阅读全文
posted @ 2016-01-06 20:24 专注博客园三十年 阅读(305) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2016-01-05 21:34 专注博客园三十年 阅读(2) 评论(0) 推荐(0)