这是我的代码。
NSString* seats = @"NEWS";
NSMutableString *sp = [[NSMutableString alloc] initWithString:@" "];
NSArray *dials=@[@[sp, sp, sp, sp], @[sp, sp, sp, sp]];
[dials[0][2] replaceCharactersInRange:NSMakeRange(5, 1) withString:[seats substringWithRange:NSMakeRange(3,1)]];
NSLog(@"dial 0 0 : %@",dials[0][0]);
NSLog(@"dial 0 1 : %@",dials[0][1]);
NSLog(@"dial 0 2 : %@",dials[0][2]);
NSLog(@"dial 0 3 : %@",dials[0][3]);
这是我的控制台读数。
2013-02-08 08:23:26.114 [29075:11303] dial 0 0 : S
2013-02-08 08:23:26.115 [29075:11303] dial 0 1 : S
2013-02-08 08:23:26.115 [29075:11303] dial 0 2 : S
2013-02-08 08:23:26.115 [29075:11303] dial 0 3 : S
我怎样才能获得以下读数,这是我想要的?
2013-02-08 08:23:26.114 [29075:11303] dial 0 0 :
2013-02-08 08:23:26.115 [29075:11303] dial 0 1 :
2013-02-08 08:23:26.115 [29075:11303] dial 0 2 : S
2013-02-08 08:23:26.115 [29075:11303] dial 0 3 :