fixedsizearray 1.3.0
A fixed size array implementation
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Fixedsizearray
A fixed size array that has a bunch of useful helper functions
Example
FixedSizeArray!(int, 10) fsa;
assert(fsa.empty);
fsa.insertBack(1);
assert(fsa.front == 1);
assert(fsa.back == 1);
assert(fsa[0] == 1);
fsa.insertFront(0);
assert(fsa.front == 0);
assert(fsa.back == 1);
assert(fsa[0] == 0);
assert(fsa[1] == 1);
int idx = 0;
foreach(it; fsa[0 .. fsa.length]) {
assert(it == idx);
++idx;
}
fsa.removeFront();
assert(fsa.front == 1);
assert(fsa.back == 1);
assert(fsa[0] == 1);
fsa.removeBack();
assert(fsa.empty);
- Registered by Robert Schadek
- 1.3.0 released 3 years ago
- burner/fixedsizearray
- LGPL3
- Copyright © 2016, burner
- Authors:
- Dependencies:
- exceptionhandling
- Versions:
-
1.3.0 2021-Feb-24 1.2.0 2019-Feb-20 1.1.1 2017-Sep-17 1.1.0 2017-Jun-12 1.0.6 2017-Apr-05 - Download Stats:
-
-
5 downloads today
-
25 downloads this week
-
145 downloads this month
-
13958 downloads total
-
- Score:
- 2.6
- Short URL:
- fixedsizearray.dub.pm