Import std.collections.array
std.collections.array
What every collection has, on T[], besides the built-in Add, Insert, RemoveAt, Clear, Contains, Clone, Reserve, TrimExcess, Count, and Capacity: searching, the ends, many elements at once, order, and shape. A lookup gives a T?, or a T?? where the elements can be Null, and what's wrong with its arguments panics where it's called. A function given to one that changes the array changes what's left to go over, as in a For ... In, and an element it takes away panics where the Method was called.
std/collections/array.fb
Types
ArrayIterator
struct
Public Struct ArrayIterator<T> Implements Iterator<T>
An array's elements, in order, as far as its Count when each is read.
std/collections/array.fb, line 383
-
The next value, or Null when there are no more.
Doc from
std.core.iterator.Iterator.Next.
Sorting
struct
Public Struct Sorting<T>
An array SortBy or SortByDescending sorted, whose ThenBy and ThenByDescending sort it again where the keys so far tie, in place.
std/collections/array.fb, line 396
-
Sorts the array again by what
keygives, smallest first, where the keys so far tie. -
The same, largest
keyfirst.
Extends
T[]
extend
Extend T[]
No doc comment.
std/collections/array.fb, line 11
-
Removes the first element equal to
value, and tells whether there was one. -
Sorts the elements in place, smallest first. Equal elements keep their order.
-
Sorts the elements in place, by what
beforesays comes first. It's a merge sort, so equal elements keep their order. -
Each element that
keepsays to keep, in a new array. -
What
changegives for each element, in a new array. -
The first element that
testsays is the one, or Null. -
The last element that
testsays is the one, or Null. -
Where the first element that
testsays is the one is, or Null. -
Where the first element equal to
valueis, or Null. -
Where the last element equal to
valueis, or Null. -
Where an element equal to
valueis in an array sorted smallest first, or Null, looking at about log2(Count) of them. -
Whether
testsays yes for any element, going no further than the first. -
Whether
testsays yes for every element, going no further than the first it doesn't. -
The first element, or Null when there's none.
-
The last element, or Null when there's none.
-
Takes the last element off, and gives it. The array can't be empty.
-
Takes the last element off, and gives it, or Null when there's none.
-
Adds each of the
valuesat the end, in order. -
The same, from any
Iterable<T>, all of which is read first. -
Puts the
valuesin, in order, fromindexon, which can be from 0 to Count. -
The same, from any
Iterable<T>, all of which is read first. -
Takes out
countelements, fromstarton, which must all be in the array. -
Takes out each element that
testsays to, keeping the others in order, and tells how many went. An elementtestadds is tested too. -
Makes the array
countelements long, taking elements off the end or addingfill. -
Gives every element the
value. -
Puts the elements in the opposite order, in place.
-
Gives each of the two elements the other's place.
-
Sorts the elements in place by what
keygives for each, smallest first. Equal keys keep their elements' order, and ThenBy on what it gives breaks their ties. -
The same, largest
keyfirst. -
Sorts the elements in place, smallest first, without making another array: a heap sort, so equal elements may change places.
-
Sorts the elements in place, by what
beforesays comes first, without making another array: a heap sort, so equal elements may change places. -
The elements, each only the first time it comes, in a new array.
-
The elements' text, as "{x}" shows each, with
separatorbetween each two. -
What
combinegives for each element in turn, starting fromstart. -
What
combinegives for each element in turn, starting from the first, or Null when there's none.
T[]
extend
Extend T[] Implements Iterable<T>
No doc comment.
std/collections/array.fb, line 378
-
Its values, from the first, in an Iterator of their own.
Doc from
std.core.iterator.Iterable.Iterate.
Report an issue with this page or with FutureBlitz on GitHub.