Skip to content

Commit

Permalink
SizeIs* documentation added
Browse files Browse the repository at this point in the history
  • Loading branch information
DusanKasan committed May 30, 2016
1 parent 5e3619e commit cbfb54f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,33 @@ Collection::from([1, 3, 3, 2])->size(); //4
size([1, 3, 3, 2]); //4
```

#### sizeBetween(int $fromSize, int $toSize) : bool
Checks whether this collection has between $fromSize to $toSize items. $toSize can be smaller than $fromSize.
```php
Collection::from([1, 3, 3, 2])->sizeIsBetween(3, 5); //true
```
```php
sizeIsBetween([1, 3, 3, 2], 3, 5); //true
```

#### sizeIsGreaterThan(int $size) : bool
Checks whether this collection has more than $size items.
```php
Collection::from([1, 3, 3, 2])->sizeIsGreaterThan(3); //true
```
```php
sizeIsGreaterThan([1, 3, 3, 2], 3); //true
```

#### sizeIsLessThan(int $size) : bool
Checks whether this collection has less than $size items.
```php
Collection::from([1, 3, 3, 2])->sizeIsLessThan(5); //true
```
```php
sizeIsLessThan([1, 3, 3, 2], 5); //true
```

#### slice(int $from, int $to) : Collection
Returns a lazy collection of items which are part of the original collection from item number $from to item number $to inclusive. The items before $from are also realized, just not returned.
```php
Expand Down

0 comments on commit cbfb54f

Please sign in to comment.