pEpObjCAdapter/NSArray+Extension.h
author buff <andreas@pep-project.org>
Fri, 03 Jul 2020 16:23:14 +0200
changeset 1633 7e933c495942
parent 187 1f630a05e444
permissions -rw-r--r--
merge IOSAD-172
     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