array_remove

Removes an element from an array.

@property @trusted
bool
array_remove
(
T
E
)
(,
ref E[] array
)

Parameters

value T

the value to be removed from the array

array E[]

the array where the value should be removed from

Return Value

Type: bool

true if something has been removed, false otherwise

Examples

auto arr = [0, 1, 2, 3];
assert(array_remove(2, [0, 1, 2, 3]) && arr = [0, 1, 3]);

string s = "test";
assert(s.remove('t') && s == "es");

Meta