Description
Return zero separators for zero items.
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.
Return zero separators for zero items.
When to use this tool
Use List Separator Between Items Count when you need a token-boundary overlap or separator-count calculation.
How to use the tool and how it works
- Enter items, leading, trailing. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read separators. Use the output convention below.
Return zero separators for zero items. Otherwise return items - 1 plus one for each enabled leading or trailing flag.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| items | Items | Required. Safe integer; minimum 0. |
| leading | Leading | Required. Boolean. |
| trailing | Trailing | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| separators | Separators | Required. Safe integer. |
{
"input": {
"items": 4,
"leading": false,
"trailing": false
},
"output": {
"separators": 3
}
} Limitations and assumptions
- Leading and trailing separators are suppressed for an empty list; separator length, escaping, and item contents are not considered.
- 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: List Short Prefix Suffix Overlap
Test every possible overlap length and retain the longest suffix of first matching the prefix of second by exact token equality.
- List Zip Shortest Tail Loss
Use the shortest as outputLength and subtract it from each source length for discarded.