Skip to content

Main content

List: List Short Prefix Suffix Overlap Tool

Return the longest exact token suffix/prefix overlap for two bounded string-token lists; no UTF-16 substring overlap or fuzzy token equality.

Loading tool…

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

  1. Enter first, second. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
firstFirstRequired. Array of text. Implementation limit: 128 items.
secondSecondRequired. Array of text. Implementation limit: 128 items.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.overlapTokenCountOverlap Token CountCalculated result member: number.
json
{
  "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

  1. Calculation and input contract: list/list-short-prefix-suffix-overlap — tool.io

Similar or alternative tools