sily.array

Small array utils

Members

Aliases

repeat
alias repeat = fill

Fills and returns new array with values val up to size

Functions

deepLength
size_t deepLength(T arr)

Returns product of all lengths of array ([[1, 2, 3], [1, 3]].deepLength -> 6)

fill
T[] fill(T[] arr, T val)

Fills array with values val up to size if it's not 0

fill
T[] fill(T val, size_t size)

Fills and returns new array with values val up to size

isOneOf
bool isOneOf(T val, T[] vals)

Returns true if val is one of vals

Templates

ArrayBaseType
template ArrayBaseType(T)

Returns base type of array (int[3][2][5] -> int)

Meta