nxt.range_ex

Extensions to std.range.

Public Imports

nxt.slicing
public import nxt.slicing;
Undocumented in source.

Members

Aliases

items
alias items = pairs
Undocumented in source.

Enums

hasPureCopy
eponymoustemplate hasPureCopy(T)
Undocumented in source.
hasStealableElements
eponymoustemplate hasStealableElements(R)
Undocumented in source.
isSortedRange
eponymoustemplate isSortedRange(R)
Undocumented in source.

Functions

adjacentPairs
auto adjacentPairs(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
adjacentTriples
auto adjacentTriples(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
adjacentTuples
auto adjacentTuples(R r)

Return: Adjacent N-Tuples of r.

asTuple
auto asTuple(T[n] arr)

Return Static Array arr as a Tuple.

frontPtr
ElementType!R* frontPtr(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
iotaOf
auto iotaOf(B begin, E end, S step)

Same as iota but with explicit conversion to type T.

iotaOfExceptional
auto iotaOfExceptional(B begin, E end, S step)
Undocumented in source. Be warned that the author may not have intended to support it.
nth
ElementType!R nth(R r, size_t n)
pairs
auto pairs(Value[Key] aa)

Return Array of Key-Value Pairs of Associative Array aa. * * See_Also: https://github.com/D-Programming-Language/druntime/pull/574 * See_Also: http://forum.dlang.org/thread/dxotcrutrlmszlidufcr@forum.dlang.org?page=2#post-fhkgitmifgnompkqiscd:40forum.dlang.org

rangify
auto rangify(T range)
Undocumented in source. Be warned that the author may not have intended to support it.
slidingSplitter
auto slidingSplitter(R data, size_t lower)
Undocumented in source. Be warned that the author may not have intended to support it.
slidingSplitter
auto slidingSplitter(R data, size_t lower, size_t upper)
Undocumented in source. Be warned that the author may not have intended to support it.
staticLengthRange
auto staticLengthRange(T[n] arr)

Overload has questionable memory safety. Would be quite cool if DIP-1000 could support this use case

staticLengthRange
auto staticLengthRange(R range)
Undocumented in source. Be warned that the author may not have intended to support it.
takeBack
ElementType!R takeBack(R r)

Take/Steal back from r destructively and return it. * * See_Also: http://forum.dlang.org/thread/jkbhlezbcrufowxtthmy@forum.dlang.org#post-konhvblwbmpdrbeqhyuv:40forum.dlang.org * See_Also: http://forum.dlang.org/thread/onibkzepudfisxtrigsi@forum.dlang.org#post-dafmzroxvaeejyxrkbon:40forum.dlang.org * See_Also: https://forum.dlang.org/thread/arufovtvoewhyfuesvco@forum.dlang.org

takeFront
ElementType!R takeFront(R r)

Take/Steal front from r destructively and return it.

zip
auto zip(R1 r1, R2 r2)

Faster than std.range.zip on DMD.

Structs

RingBuffer
struct RingBuffer(T)

Ring Buffer.

S
struct S
Undocumented in source.
SlidingSplitter
struct SlidingSplitter(Range)

Sliding Splitter.

Templates

CommonElementType
template CommonElementType(Rs...)

Is the CommonType of the ElementTypes of the ranges Rs.

genTypeList
template genTypeList(T, size_t n)
isSortedRange_alt
template isSortedRange_alt(R)

True if R is a SortedRange

sortingPredicate
template sortingPredicate(Range, alias fallbackPred = "a < b")

Given a SortedRange R, sortingPredicate!R(a, b) will call in to the * predicate that was used to create the SortedRange. * * Params: * Range = the range to extract the predicate from * fallbackPred = the sorting predicate to fallback to if Range is not a SortedRange

Variables

haveCommonElementType
enum bool haveCommonElementType(Types...);
Undocumented in source.

Meta