ConciseKit:
https://github.com/petejkim/ConciseKit
简介:
NSArray
> $arr(foo, bar) => [NSArray arrayWithObjects:foo, bar, nil]
[array $eachWithIndex:^(id obj, NSUInteger i) {
NSLog(@"%d %@", i, obj);
}]
NSString
> $str(@"foo: %@", bar) => [NSString stringWithFormat:@"foo: %@", bar]
NSDictionary
> $dict(v1, k1, v2, k2) => [NSDictionary dictionaryWithObjectsAndKeys:v1, k1, v2, k2, nil]
https://github.com/petejkim/ConciseKit
简介:
NSArray
> $arr(foo, bar) => [NSArray arrayWithObjects:foo, bar, nil]
[array $eachWithIndex:^(id obj, NSUInteger i) {
NSLog(@"%d %@", i, obj);
}]
NSString
> $str(@"foo: %@", bar) => [NSString stringWithFormat:@"foo: %@", bar]
NSDictionary
> $dict(v1, k1, v2, k2) => [NSDictionary dictionaryWithObjectsAndKeys:v1, k1, v2, k2, nil]