Description
Compare up to limit and both list lengths, recording the first mismatch.
Token lists preserve element boundaries that raw character matching can lose. Prefix-suffix overlap and separator placement depend on exact element and empty-list conventions.
Compare up to limit and both list lengths, recording the first mismatch.
When to use this tool
Use List Bounded Prefix Equality Witness when you need a token-boundary overlap or separator-count calculation.
How to use the tool and how it works
- Enter first, second, limit. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read equal, compared, mismatch. Inspect equal before interpreting the associated values.
Compare up to limit and both list lengths, recording the first mismatch. If a list ends before limit and lengths differ, use the compared length as the mismatch; otherwise return -1.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First value or boundary under the stated formula. | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| second | Second value or boundary under the stated formula. | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| limit | Limit | Required. Safe integer; minimum 0; maximum 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| equal | Equal | Required. Boolean. |
| compared | Compared | Required. Safe integer. |
| mismatch | Mismatch | Required. Safe integer. |
{
"input": {
"first": [
"a",
"b"
],
"second": [
"a",
"c"
],
"limit": 2
},
"output": {
"equal": false,
"compared": 2,
"mismatch": 1
}
} Limitations and assumptions
- Equality is bounded by limit rather than necessarily covering both whole lists; -1 denotes no witness found.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Choose token normalization and escaping rules before joining or merging the actual list contents.
References
Similar or alternative tools
- List Sentinel Data Value Collision
Compare each value exactly with sentinel and return all zero-based indexes of matches.
- List Gather Duplicate Index Flag
Record each repeated index once in the order its repetition is first encountered.