std.array.staticArray shim
Push val into arr, treating it like a queue.
Equivalents of array(xxx(...)).
Like amap but with a static array.
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 element of arr 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.
Reverse of bytes()
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.
Reimplementation of std.algorithm.indexOf, but with no auto-decoding.
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.
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.
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.
Slice a variable.
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.
Return the value represented as an array of bytes.
Array with normalized comparison and hashing.
If arr is null, return null. Otherwise, return a non-null transformation dg over arr.
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