is_strict_prefix

Function is_strict_prefix 

Source
fn is_strict_prefix(prefix: &[usize], full: &[usize]) -> bool
Expand description

Check if prefix is a strict prefix of full

A strict prefix means:

  • prefix is shorter than full
  • All elements of prefix match the corresponding elements in full

Examples:

  • is_strict_prefix([0], [0, 1]) = true
  • is_strict_prefix([], [0]) = true
  • is_strict_prefix([0], [0]) = false (equal, not strict)
  • is_strict_prefix([0], [1]) = false (not a prefix)