使用%% percent escape更正日志输出格式

时间:2012-10-20 14:19:06

标签: iphone objective-c ios xcode nsstring

我正在创建一个这样的字符串:

NSString *string = [NSString stringWithFormat: @"%%type is AKA %@", countryWithUnderscore];

在这种情况下,countryWithUnderscore是'澳大利亚'。双百分号%%应该返回一个百分号,字符串最终应该像这样记录:

  

%type是AKA Australia

但是它会像这样记录:

  

tpe是AKA australia

所以百分号没有显示在字符'y'被切断,我在哪里出错,我和其他类似的测试字符串有同样的问题....

为什么会这样?对我来说似乎很奇怪......

0 个答案:

没有答案