字符串
//    NSString *str=@"dasuink";
       
//        取字符串长度
//     NSLog(@"%ld",str.length);
       
        //第几个字符.
//        unichar ch=[str characterAtIndex:5];
//        NSLog(@"%c",ch);
//       
//        NSString *str1=@"全球领先的移动设备操作系统";
//        从字符串开始到第几位。
//        NSString *str2=[str1 substringToIndex:4];
//        NSLog(@"%@",str2);
//        从第几位开始到字符串结束
//        NSString *str3=[str1 substringFromIndex:9];
//        NSLog(@"%@",str3);
//        范围 location 位置 length 长度
//        NSRange range;
//        range.location=5;
//        range.length=4;
//        指定范围的字符串
//        NSString *str4=[str1 substringWithRange:range];
//        NSLog(@"%@",str4);
       
//     取出字符串的范围和长度
//        NSRange range1 =[str1 rangeOfString:@"移动设备"];
//        NSLog(@"%@",NSStringFromRange(range1));
       
//        字符串的比较
//        NSString *str1=@"asv";
//        NSString *str2=@"asg";
//        NSComparisonResult result=[str1 compare:str2];
//        NSLog(@"%ld",result);
        NSString *str3=@"ASG";
        NSString *str4=@"asg";
       
//        不区分大小写比较
//        NSComparisonResult result1=[str3 caseInsensitiveCompare:str4];
//        NSLog(@"%ld",result1);
       
       BOOL bol= [str3 isEqualToString:str4];
        NSLog(@"%d",bol);
//        以什么开头或以什么结尾
//        prefix  suffix
        NSString *str2=@"www.qq.com";
        BOOL bol1=[str2 hasSuffix:@".com"];
        NSLog(@"%d",bol1);

       
//        数字字符的转换
        NSString *num=@"132.465";
        NSLog(@"%f",num.doubleValue*10);
       
//        C-OC字符串转换。
//        OC-C
        NSString *str11=@"asdf";
        NSLog(@"%@",str11);
        NSLog(@"%s",str11.UTF8String);
       
        char *chs="qwer";
//        C-OC
        NSLog(@"%@",[NSString stringWithUTF8String:chs]);
        NSLog(@"%@",@(chs));
       
//        字符串的替换
       
        NSString *str22=@"josajfoajlkfah";
        NSString *str33=[str22 stringByReplacingOccurrencesOfString:@"josa" withString:@"JOSA"];
         NSLog(@"%@",str22);
        NSLog(@"%@",str33);
       
        NSRange range=[str22 rangeOfString:@"osa"];
        NSString *str44=[str22 stringByReplacingCharactersInRange:range withString:@"***"];
        NSLog(@"%@",str44);