如何彻底判断用户输入的字符串是否为空?
(BOOL)isstring:(nsstring*)str{
//1.长度等于0,strnil相同,直接判定为null。
if(字符串长度为0)返回YES
//2.表示长度大于0,所以首先要对用户输入的字符中的空格和换行符进行修整,然后才能判断长度是否为0。
nsstring*trimStr[strstringbytrimmingcharact:[nscharactersetwhitespaceandnewlinecharacterset]]
If(trimStr.length0){//空格被切掉,换行后长度为0。
返回是
}else{//剪去空格换行后长度不为0。
退货编号
}