从 JSON 响应中提取字符串后:
NSString *responseMessage = [NSString stringWithFormat:@"%@",[[JSON objectForKey:@"Response"]valueForKey:@"Message"]];
NSLog(@"<%@>",responseMessage);
它看起来像这样:
<(
"not found"
)>
这是相关代码:
所以当我尝试比较它时,isEqualToString
总是返回false
([responseMessage isEqualToString:@"not found"])?NSLog(@"They are equal"):NSLog(@"They are different");//they are different
如何摆脱这些括号以更好地比较两个字符串?提前谢谢。