Skip to content

Main content

List Sentinel Data Value Collision Tool

Calculate list sentinel data value collision from explicit caller-supplied inputs.

Loading tool…

Description

Compare each value exactly with sentinel and return all zero-based indexes of matches.

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 each value exactly with sentinel and return all zero-based indexes of matches.

When to use this tool

Use List Sentinel Data Value Collision when you need a token-boundary overlap or separator-count calculation.

How to use the tool and how it works

  1. Enter values, sentinel. 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 collision, indexes. Inspect collision before interpreting the associated values.

Compare each value exactly with sentinel and return all zero-based indexes of matches. Set collision when that list is nonempty.1

Input fieldMeaning and unitsAccepted input
valuesValuesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
sentinelSentinelRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
collisionCollisionRequired. Boolean.
indexesIndexesRequired. Array of safe integer; maximum items 256.
json
{
  "input": {
    "values": [
      "a",
      "_",
      "b",
      "_"
    ],
    "sentinel": "_"
  },
  "output": {
    "collision": true,
    "indexes": [
      1,
      3
    ]
  }
}

Limitations and assumptions

  • A matching data value can collide with a sentinel convention; no escaping or replacement is applied.
  • 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-sentinel-data-value-collision — tool.io

Similar or alternative tools