s with slice replaced by
replacement[].
inout(T)[] replaceSlice(T)(inout(T)[] s, in T[] slice, in T[] replacement)Creates a new array such that the items in slice are replaced with the items in replacement. slice and replacement do not need to be the same length. The result will grow or shrink based on the items given.
s | the base of the new array |
slice | the slice of s to be replaced |
replacement | the items to replace slice with |
s with slice replaced by
replacement[].
substitute for a lazy replace.