|
|
|
|
|
by Dr_Emann
1945 days ago
|
|
Expand does actually exist in the standard library, but it's a bit of a strange incantation... vec.splice(i..i, std::iter::repeat(0).take(length));
This replaces the values in range `i..i` (an empty range starting at i) with `length` copies of `0`. |
|