Function array_padded_with
pub fn array_padded_with<T, let N: u32>(
array: [T; N],
from_index: u32,
padded_with: T,
) -> bool
where
T: Eq
pub fn array_padded_with<T, let N: u32>(
array: [T; N],
from_index: u32,
padded_with: T,
) -> bool
where
T: Eq
Returns true iff every element of
arrayat index>= from_indexequalspadded_with.from_indexmust be a valid index into the array, i.e.from_index <= N(the boundaryfrom_index == Ndenotes a full prefix with no padding). Passingfrom_index > Nis rejected: otherwise this check would pass vacuously (the loop never reachesfrom_index), letting a caller believe the array holds afrom_index-length prefix followed by padding even though the array is shorter thanfrom_index.