pEpObjCAdapter/NSArray+Extension.h
author Dirk Zimmermann <dirk@pep-project.org>
Thu, 15 Mar 2018 08:44:12 +0100
branchIOSAD-49
changeset 540 90495cd2cf62
parent 187 1f630a05e444
permissions -rw-r--r--
Closing unneeded heads, reopen if still needed
dirk@187
     1
//
dirk@187
     2
//  NSArray+Extension.h
dirk@187
     3
//  pEpiOSAdapter
dirk@187
     4
//
dirk@187
     5
//  Created by Dirk Zimmermann on 03.05.17.
dirk@187
     6
//  Copyright © 2017 p≡p. All rights reserved.
dirk@187
     7
//
dirk@187
     8
dirk@187
     9
#import <Foundation/Foundation.h>
dirk@187
    10
dirk@187
    11
@interface ArrayTake : NSObject
dirk@187
    12
dirk@187
    13
@property (nonatomic, readonly) NSArray * _Nonnull elements;
dirk@187
    14
@property (nonatomic, readonly) NSArray * _Nonnull rest;
dirk@187
    15
dirk@187
    16
@end
dirk@187
    17
dirk@187
    18
@interface NSArray (Extension)
dirk@187
    19
dirk@187
    20
/**
dirk@187
    21
 @Return The next count elements or nil, if less than that amount available.
dirk@187
    22
 */
dirk@187
    23
- (ArrayTake * _Nullable)takeOrNil:(NSInteger)count;
dirk@187
    24
dirk@187
    25
@end