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);
Authors:
  • Robert burner Schadek
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
Show all 16 versions
Download Stats:
  • 7 downloads today

  • 33 downloads this week

  • 153 downloads this month

  • 13973 downloads total

Score:
2.6
Short URL:
fixedsizearray.dub.pm