Description
Test every possible overlap length and retain the longest suffix of first matching the prefix of second by exact token equality.
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.
Test every possible overlap length and retain the longest suffix of first matching the prefix of second by exact token equality.
When to use this tool
Use List: List Short Prefix Suffix Overlap when you need a token-boundary overlap or separator-count calculation.
How to use the tool and how it works
- Enter first, second. 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 result. Expand result to inspect the returned fields.
Test every possible overlap length and retain the longest suffix of first matching the prefix of second by exact token equality. Return zero when no overlap exists.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Array of text. Implementation limit: 128 items. |
| second | Second | Required. Array of text. Implementation limit: 128 items. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.overlapTokenCount | Overlap Token Count | Calculated result member: number. |
{
"input": {
"first": [
"x",
"ab",
"c"
],
"second": [
"ab",
"c",
"z"
]
},
"output": {
"result": {
"overlapTokenCount": 2
}
}
} Limitations and assumptions
- Tokens are compared literally without normalization or fuzzy matching; this does not merge the lists or find internal overlaps.
- Outputs are nested inside result. 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.
Alternative or Complementary methods
Choose token normalization and escaping rules before joining or merging the actual list contents.
References
Similar or alternative tools
- List Separator Between Items Count
Return zero separators for zero items.
- List Zip Shortest Tail Loss
Use the shortest as outputLength and subtract it from each source length for discarded.