Report a bug
If you spot a problem with this page, click here to create a Github issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

mir.range

Ranges.
See Also:
Authors:
Ilya Yaroshenko, Phobos Authors
struct Counter(T);
Data size counter.
Does not store anything.
Examples:
Counter!char counter;
counter.put("Ми");
assert(counter.count == 4);
counter.put('р'); // Cyrillic 
assert(counter.count == 6);
Examples:
Counter!wchar counter;
counter.put("Ми");
assert(counter.count == 2);
counter.put('р'); // Cyrillic
assert(counter.count == 3);
Examples:
Counter!int counter;
import std.algorithm: until;
counter.put([1, 2, 3, 4, 5].until(3));
size_t _count;
@property size_t count()();
Data count.
void put(U)(auto ref U item)
if (canPutItem!U);
void put(Range)(Range items)
if (canPutRange!Range);