replaceInPlace

fnvoid replaceInPlace(T, Range)(ref T[] array, size_t from, size_t to, Range stuff) if (is(typeof(replace(array, from, to, stuff))))

Replaces elements from array with indices ranging from from (inclusive) to to (exclusive) with the range stuff. Expands or shrinks the array as needed.

Parameters

arraythe array to scan
fromthe starting index
tothe ending index
stuffthe items to replace in-between from and to