一般常用于服务器返回的数据,判断该字段是否为空串,而后进行剩余操作。
宏定义的,方便使用
#define isEmptyString(s) (((s) == nil) || ([(s) stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length == 0))
一般常用于服务器返回的数据,判断该字段是否为空串,而后进行剩余操作。
宏定义的,方便使用
#define isEmptyString(s) (((s) == nil) || ([(s) stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length == 0))
本文标题:判断字符串是否为空串
本文链接:https://www.haomeiwen.com/subject/setxxftx.html
网友评论