iOS字符串的大小写互相转换
2015-12-23 17:27
423 查看
NSString *str =@"we are togeter";
NSString *Str = [struppercaseStringWithLocale:[NSLocalecurrentLocale]];
NSLog(@"upperStr: %@", str);//转成全部大写
NSString *Str1 = [StrcapitalizedStringWithLocale:[NSLocalecurrentLocale]];
NSLog(@"capStr: %@", Str1);//转成首字母大写
NSString *Str2 = [Str1lowercaseStringWithLocale:[NSLocalecurrentLocale]];
NSLog(@"lowerStr: %@", Str2);//转成全部小写
NSString *Str = [struppercaseStringWithLocale:[NSLocalecurrentLocale]];
NSLog(@"upperStr: %@", str);//转成全部大写
NSString *Str1 = [StrcapitalizedStringWithLocale:[NSLocalecurrentLocale]];
NSLog(@"capStr: %@", Str1);//转成首字母大写
NSString *Str2 = [Str1lowercaseStringWithLocale:[NSLocalecurrentLocale]];
NSLog(@"lowerStr: %@", Str2);//转成全部小写
相关文章推荐
- iOS如何从一个界面返回到指定界面?
- iOS CoreAnimation专题——原理篇(三) CALayer的模型层与展示层
- iOS中强制转换
- iOS中消息的传递机制
- iOS使用NSMutableAttributedString 实现富文本(不同颜色字体、划线等等)
- iOS如何隐藏NavigationBar
- IOS开发微博中涉及到的一些正则表达式(表情,话题,链接,@)
- iOS 深浅拷贝
- iOS开发简单的实现后台任务(诸如后台播放音乐,定时器等)
- iOS在Xcode中,文件名后小方框中的A(M或C)代表的意思
- iOS AES加密解密实现方法
- iOS如何使屏幕一直保持亮屏?
- IOS手势操作
- iOS开发-CoreMotion框架(加速计和陀螺仪)
- iOS AES128 CBC No Padding加密解密
- iOS 开发项目之 QQ 音乐
- IOS block简单使用
- 开源中国iOS客户端学习——(十一)AES加密
- iOS 根据文字内容动态设置宽度与高度
- iOS strong,retain,assign,weak,copy属性实测