Skip to content

Instantly share code, notes, and snippets.

@jakebromberg
Created June 24, 2014 16:32
Show Gist options
  • Save jakebromberg/7cf6b8496409e5ef38d1 to your computer and use it in GitHub Desktop.
Save jakebromberg/7cf6b8496409e5ef38d1 to your computer and use it in GitHub Desktop.
NSString Block Append
@interface NSString (Append)
- (NSString *(^)(NSString *))append __attribute__((const));
@end
@implementation NSString (Append)
- (NSString *(^)(NSString *))append
{
return ^NSString *(NSString *append)
{
return [self stringByAppendingString:append];
};
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment