zoukankan      html  css  js  c++  java
  • nssstring 转换大小写

     //7.将字符串中的字母转换成大写

            NSString * str10 = @"china";

            NSString * tmpStr1 = [str10 uppercaseString];

            NSLog(@"tmpStr1 %@ str10 %@",tmpStr1,str10);

            

            //8.将字符中的字母转换成小写

            NSString * str11 = @"CHINA";

            NSString * tmpStr2 = [str11 lowercaseString];

            NSLog(@"tmpStr2 %@",tmpStr2);

            

            //9.将首字母大写

            NSString * str12 = @"china";

            NSString * tmpStr3 = [str12 capitalizedString];

            NSLog(@"tmpStr3  %@",tmpStr3);

  • 相关阅读:
    Python
    Python
    Python
    Python
    Python
    Python
    Python
    python
    对象
    py常用模块
  • 原文地址:https://www.cnblogs.com/supper-Ho/p/6178720.html
Copyright © 2011-2022 走看看