Enhanced C#
Language of your choice: library documentation
Static Public Member Functions | List of all members
Loyc.Collections.RangeExt Class Reference

Extension/helper methods for ranges. More...


Source file:

Remarks

Extension/helper methods for ranges.

Static Public Member Functions

static int Skip< R, T > (ref R range, int count)
 Advances by the specified number of elements. More...
 
static int DropLast< R, T > (ref R range, int count)
 
static T PopFirst< R, T > (ref R range, T defaultValue)
 
static T PopFirst< R, T > (ref R range)
 
static T PopLast< R, T > (ref R range, T defaultValue)
 
static T PopLast< R, T > (ref R range)
 
static bool Contains< R, T > (this R range, IRangeEx< R, T > other)
 
static bool Overlaps< R, T > (this R range, IRangeEx< R, T > other)
 

Member Function Documentation

static int Loyc.Collections.RangeExt.Skip< R, T > ( ref R  range,
int  count 
)
inlinestatic

Advances by the specified number of elements.

Parameters
countNumber of items to remove from the beginning of the range. If count is higher than the number of items in the range, no exception is thrown but the return value will be less than this value.
Returns
Returns the number of items skipped.
Type Constraints
R :IFRange<T> 

References Loyc.Collections.IFRange< out out T >.PopFirst(), and Loyc.Collections.IBRange< out out T >.PopLast().