.....
@"appName":@"愤怒的火柴人3", @"appIcon":@"http://pp.myapp.com/ma_icon/0/icon_1247358_20618471_1425602461/96",
@"appName":@"狂斩三国", @"appIcon":@"http://pp.myapp.com/ma_icon/0/icon_10205757_21027111_1430808325/96"
截取不重复的文件名
NSString *icon = @"http://pp.myapp.com/ma_icon/0/icon_1247358_20618471_1425602461/96"; NSString *ranges = @"/96";//取出末尾相同的后缀 NSString *names = [[icon substringToIndex:icon.length - ranges.length] lastPathComponent];//截取后缀之前的字符串 并取最后一个元素 NSLog(@"%@",names);
打印输出:
2015-06-05 13:56:40.582 跟java结合生成plist文件[9491:343908] icon_1247358_20618471_1425602461
2015-06-05 13:56:40.582 跟java结合生成plist文件[9491:343908] icon_10205757_21027111_1430808325