Sha256: 6536e54e7e25415eae7b7b52d20820ea525da6b3c182053b2a89344f67f81391

Contents?: true

Size: 760 Bytes

Versions: 4

Compression:

Stored size: 760 Bytes

Contents

//
//  NSMutableArray+ObjectiveSugar.m
//  SampleProject
//
//  Created by Marin Usalj on 11/23/12.
//  Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved.
//

#import "NSMutableArray+ObjectiveSugar.h"

@implementation NSMutableArray (ObjectiveSugar)

- (void)push:(id)object {
    [self addObject:object];
}

- (id)pop {
    id object = [self lastObject];
    [self removeLastObject];
    
    return object;
}

- (NSArray *)pop:(NSUInteger)numberOfElements {
    NSMutableArray *array = [NSMutableArray arrayWithCapacity:numberOfElements];
    
    for (int i = 0; i < numberOfElements; i++)
        [array insertObject:[self pop] atIndex:0];
    
    return array;
}

- (void)concat:(NSArray *)array {
    [self addObjectsFromArray:array];
}

@end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appjam-0.1.8.11 lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.m
appjam-0.1.8.10 lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.m
appjam-0.1.8.9 lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.m
appjam-0.1.8.8 lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.m