我将字符串的值传递给 Web 服务。如果字符串有一些值,那么就可以了。
但如果不包含任何为 null 的值,则打印 (null)。
例如:
NSMutableString *str1 = [NSMutableString stringWithFormat:@""];
NSString *string = [NSString stringWithFormat:@"str1 has %@ value", str1];
NSLog(@"%@", string);
应该打印:str1 有值
而是打印: str1 has (null) value