1
我将字符串的值传递给Web服务。如果字符串有一些值,那么就没问题。NSMutableString:需要插入没有值而不是(空)
但如果不包含任何值为null的值,则它会打印(null)。
为如:
NSMutableString *str1 = [NSMutableString stringWithFormat:@""];
NSString *string = [NSString stringWithFormat:@"str1 has %@ value", str1];
NSLog(@"%@", string);
应打印:STR1具有价值
,而不是它打印如:str1有(空)值
它打印“STR1具有价值”对我来说,就像你所期望的。你确定问题不在其他地方吗? – Tommy