Skip to content

Instantly share code, notes, and snippets.

@jwhitehorn
Created March 1, 2018 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwhitehorn/d2ca307b25e6ad302ba51b12f796cb2a to your computer and use it in GitHub Desktop.
Save jwhitehorn/d2ca307b25e6ad302ba51b12f796cb2a to your computer and use it in GitHub Desktop.
#import "NSArray+Construction.h"
@implementation NSArray (Construction)
+ (NSArray *) arrayWith:(int)count copiesOf:(NSString *)str {
NSMutableArray *result = [NSMutableArray new];
for(int i = 0; i != count; i++){
[result addObject:str];
}
return result;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment