zoukankan      html  css  js  c++  java
  • iOS字符串大小写转换使用小结

      iOS开发中字符串用的比较多,追加,拆分,截取,替换,比较,大小写转换使用的频率还挺高。今天看oc技术书的时候看到关于大小写转换的地方,有一个说的是所有字母首字母大写,还是第一次看到,记录一下,以备后用。

      1、所有的小写字母转换成大写

      NSString *ceshi=@"You do not have the corresponding permissions, please contact the system administrator to add";

        //所有的小写字母都转换成大写

        NSLog(@"first:%@",[ceshi uppercaseString]);

      first:YOU DO NOT HAVE THE CORRESPONDING PERMISSIONS, PLEASE CONTACT THE SYSTEM ADMINISTRATOR TO ADD

      2、所有的大写字母转换成小写

        NSLog(@"second:%@",[ceshi lowercaseString]);

      second:you do not have the corresponding permissions, please contact the system administrator to add

      3、所有的首字母大写,其余变成小写

        NSLog(@"third:%@",[ceshi capitalizedString]);

      third:You Do Not Have The Corresponding Permissions, Please Contact The System Administrator To Add

  • 相关阅读:
    ios连信登录简要分析
    某app涉及腾讯开源数据库wcdb逆向
    某手反调试绕过
    翻译君数据库解密
    顺丰Apk加密数据解密分析
    vue项目使用Cordova用打包成app 沉浸式导航栏
    GitHub项目简介
    vue项目的开发
    vue项目创建
    深入理解JavaScript程序设计
  • 原文地址:https://www.cnblogs.com/bigant9527/p/14744286.html
Copyright © 2011-2022 走看看