> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function array_padded_with

Module: `noir_aztec::protocol::utils::arrays`

```rust
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 `array` at index `>= from_index` equals `padded_with`.

`from_index` must be a valid index into the array, i.e. `from_index <= N` (the boundary `from_index == N` denotes a full prefix with no padding). Passing `from_index > N` is rejected: otherwise this check would pass vacuously (the loop never reaches `from_index`), letting a caller believe the array holds a `from_index`-length prefix followed by padding even though the array is shorter than `from_index`.
