NSObject+Aspect is a category of aspect oriented programming for NSObject.
[NSString injectBlock:^(NSString *string, NSUInteger anIndex) {
NSLog(@"%@ %u", string, anIndex);
} beforeSelector:@selector(substringToIndex:)];
NSString *aString=@"This is a text for sample.";
NSString *substring = [aString substringToIndex:4];[NSString separateBeforeBlockFromSelector:@selector(substringToIndex:)]; // Remove before block[NSString injectBlock:^(NSString *string, NSUInteger anIndex) {
NSLog(@"%@ %u", string, anIndex);
} afterSelector:@selector(substringToIndex:)];
NSString *aString=@"This is a text for sample.";
NSString *substring = [aString substringToIndex:4];[NSString separateAfterBlockFromSelector:@selector(substringToIndex:)]; // Remove after blockNSObject+Aspect is available under the MIT license. See the LICENSE file for more info.