Push val into arr, treating it like a queue.
Reverse of .asBytes
Whether array contains value, no BS.
Ditto, for substrings
Like startsWith, but with an offset.
Sorts arr in-place using counting sort. The difference between the lowest and highest return value of orderPred(arr[i]) shouldn't be too big.
If arr starts with prefix, slice it off and return true. Otherwise leave arr unchaned and return false.
Given an array and a reference to an element inside it, returns its index. The reverse operation of indexing an array.
Returns an empty, but non-null slice of T.
Like AA.get - soft indexing, throws an Exception (not an Error) on out-of-bounds, even in release builds.
Like AA.get - soft indexing, returns default value on out-of-bounds.
Expand the array if index is out-of-bounds.
Complement to std.string.indexOf which works with arrays of non-character types. Unlike std.algorithm.countUntil, it does not auto-decode, and returns an index usable for array indexing/slicing.
A more generic alternative to the "is" operator, which doesn't have corner cases with static arrays / floats.
Returns true if one of the elements of arr contains val.
Returns true if one of the elements of arr contains val.
Equivalent of PHP's list language construct: http://php.net/manual/en/function.list.php
Works with arrays and tuples. Specify null as an argument to ignore that index (equivalent of list(x, , y) in PHP).
C memcmp wrapper.
Like std.algorithm.copy, but without the auto-decode bullshit. https://issues.dlang.org/show_bug.cgi?id=13650
Ensure that arr is non-null if empty.
Return s expanded to at least l elements, filling them with c.
Select and return a random element from the array, and remove it from the array.
Expand the array if index is out-of-bounds.
Peek at the front of arr, treating it like a queue.
Peek at the back of arr, treating it like a queue.
Pop a value off the front of arr, treating it like a queue.
Remove all matching elements in an array, mutating the array. Returns the number of removed elements.
Remove first matching element in an array, mutating the array. Returns true if the array has been modified. Cf. K[V].remove(K)
Return a new T[] of length l, filled with c.
Select and return a random element from the array.
Remove the first element of arr and return it.
Remove the n first elements of arr and return them.
Returns the slice of source up to the first occurrence of delim, and fast-forwards source to the point after delim. If delim is not found, the behavior depends on orUntilEnd: - If orUntilEnd is false (default), it returns null and leaves source unchanged. - If orUntilEnd is true, it returns source, and then sets source to null.
Slices an array. Throws an Exception (not an Error) on out-of-bounds, even in release builds.
Given an array and its slice, returns the start index of the slice inside the array. The reverse operation of slicing an array.
Given an array and a reference to an element, return whether the array slices over the element reference.
Like std.array.split, but always returns a non-empty array.
Like std.array.split, but returns null if val was empty.
Include delimiter in result chunks as prefix
Include delimiters in result chunks as prefix/suffix
Include delimiter in result chunks as suffix
Peek at the front of arr, treating it like a stack.
Pop a value off the front of arr, treating it like a stack.
Push val into arr, treating it like a stack.
Insert elements in the front of arr.
Performs binary operation op on every element of a and b.
Performs in-place binary operation op on every element of a and b.
std.array.staticArray polyfill
Return the value represented as an array of bytes.
Slice a variable.
Return the value represented as a static array of bytes.
Wrap v into a static array of length 1.
Array with normalized comparison and hashing.
Equivalents of array(xxx(...)).
If arr is null, return null. Otherwise, return a non-null transformation dg over arr.
Like std.algorithm.skipOver, but stops when pred(suffix) or pred(suffix[0]) returns false.
Convert a dynamic array to a static array
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Array utility functions