美文网首页
NSLog输出Array/Dictionary中文乱码的问题

NSLog输出Array/Dictionary中文乱码的问题

作者: 面糊 | 来源:发表于2017-11-08 11:19 被阅读17次
  1. 头回见到让手写这个代码的...

     NSMutableString *str = [[NSMutableString alloc] initWithFormat:@"{\n"];
     [dict enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop) {
         [str appendFormat:@"\t%@ : \"%@\"; \n", key, obj];
     }];
     [str appendFormat:@"}"];
     NSLog(@"%@", str);

相关文章

网友评论

      本文标题:NSLog输出Array/Dictionary中文乱码的问题

      本文链接:https://www.haomeiwen.com/subject/vbuemxtx.html