ios 判断字符串是否全部空格
来源:互联网 发布:2016农村金融数据报告 编辑:程序博客网 时间:2024/06/05 09:59
+ (
BOOL
) isEmpty:(
NSString
*) str {
if
(!str) {
return
true
;
}
else
{
//A character set containing only the whitespace characters space (U+0020) and tab (U+0009) and the newline and nextline characters (U+000A–U+000D, U+0085).
NSCharacterSet
*set = [
NSCharacterSet
whitespaceAndNewlineCharacterSet];
//Returns a new string made by removing from both ends of the receiver characters contained in a given character set.
NSString
*trimedString = [str stringByTrimmingCharactersInSet:set];
if
([trimedString length] == 0) {
return
true
;
}
else
{
return
false
;
}
}
}
阅读全文
0 0
- ios 判断字符串是否全部空格
- iOS判断字符串内容是否全部为 空格
- iOS判断字符串是否包含空格
- 判断字符串是否为空格
- iOS小demo之判断字符串是否是有空格和去除字符串中的空格
- 判断字符串是否全部是数字
- 判断一个字符串是否全部为数字
- 判断字符串是否全部是数字
- ios 消除字符串首尾空格或者全部的空格
- iOS 判断是否全部为数字
- flex 判断字符串中是否含有空格
- 判断字符串中是否有空格
- 判断一个字符串中是否有空格
- Java: 判断字符串之间 是否存在空格
- 判断字符串是否为空,是否只有空格
- JAVA判断字符串是否为空,是否只有空格
- java 判断字符串是否为空,空字符串,或者空格
- iOS 判断输入框是否全是空格的判断
- OpenGL CubeMapping及天空盒
- PHP中无限极分类函数的实现
- 今天搜并发看到的一些文章
- 第五周(1) Flag相关的功能设计
- python 确保windows下网络正常
- ios 判断字符串是否全部空格
- final关键字
- ECMAScript创建对象
- 百度地图集成的那些坑
- 17.6.1]Codeforces Round #417 (Div. 2)(T1-T3)
- nginx启动、重启、关闭
- yii2 activeform相关问题记录
- Spark 广播变量(broadcast)更新方法
- Uncaught Error: Bootstrap's JavaScript requires jQuery