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
     1 //
     2 //  NSArray+Extension.h
     3 //  pEpiOSAdapter
     4 //
     5 //  Created by Dirk Zimmermann on 03.05.17.
     6 //  Copyright © 2017 p≡p. All rights reserved.
     7 //
     8 
     9 #import <Foundation/Foundation.h>
    10 
    11 @interface ArrayTake : NSObject
    12 
    13 @property (nonatomic, readonly) NSArray * _Nonnull elements;
    14 @property (nonatomic, readonly) NSArray * _Nonnull rest;
    15 
    16 @end
    17 
    18 @interface NSArray (Extension)
    19 
    20 /**
    21  @Return The next count elements or nil, if less than that amount available.
    22  */
    23 - (ArrayTake * _Nullable)takeOrNil:(NSInteger)count;
    24 
    25 @end