Function splice_at_count
pub fn splice_at_count<T, let N: u32>(
array1: [T; N],
count: u32,
array2: [T; N],
) -> [T; N]
where
T: Eq
pub fn splice_at_count<T, let N: u32>(
array1: [T; N],
count: u32,
array2: [T; N],
) -> [T; N]
where
T: Eq
Splices two fixed-size arrays at
count.The result consists of:
countelements fromarray1, followed byN - countelements fromarray2, producing a new array of lengthN.In other words:
result[0..count] == array1[0..count]result[count..N] == array2[0..(N - count)]Note: This function does not consider any notion of "used length". It always copies exactly
N - countelements fromarray2. Ifarray2has fewer meaningful items than that, elements from its higher indices (typically padding) will be included in the result. Callers must ensure thatcountcorrectly reflects the intended splice point and that no meaningful elements are truncated.