Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (31 sloc) 0.601 kB
//
// NSArray+GBArray.m
// appledoc
//
// Created by Tomaz Kragelj on 13.1.11.
// Copyright 2011 Gentle Bytes. All rights reserved.
//
#import "NSArray+GBArray.h"
@implementation NSArray (GBArray)
- (id)firstObject {
if ([self count] == 0) return nil;
return [self objectAtIndex:0];
}
- (BOOL)isEmpty {
return ([self count] == 0);
}
@end
#pragma mark -
@implementation NSMutableArray (GBMutableArray)
- (void)push:(id)object {
[self addObject:object];
}
- (id)pop {
id result = [self peek];
[self removeLastObject];
return result;
}
- (id)peek {
return [self lastObject];
}
@end
Jump to Line
Something went wrong with that request. Please try again.