Description
Check literal field-ID prefix and UTF-16 length.
Machine and field identifiers carry literal spelling, prefix, length and numeric-token conventions. Removing leading zeros can merge distinct identifiers, and a restricted task-token parser does not validate a complete machinery message or standard. Preserve original spellings when resolving ambiguous records.
Check literal field-ID prefix and UTF-16 length.
When to use this tool
Use Field ID Check Token when checking the stated machinery value conversion or identifier-token convention.
How to use the tool and how it works
- Enter token, prefix, expectedLength. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read prefixMatches, lengthMatches, preserved. Inspect prefixMatches, lengthMatches before interpreting the associated values.
Check literal field-ID prefix and UTF-16 length. Require expectedLength a nonnegative whole number; prefixMatches uses startsWith, lengthMatches compares token.length, preserved returns token unchanged.1
Unicode code points and UTF-16 code units are different counting units. Neither alone measures user-perceived grapheme clusters or rendered text width.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Token | Required. Text; maximum UTF-16 length 8192. |
| prefix | Prefix | Required. Text; maximum UTF-16 length 8192. |
| expectedLength | Expected UTF-16 code-unit count, not Unicode code-point or grapheme count. | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| prefixMatches | Prefix Matches | Required. Boolean. |
| lengthMatches | Length Matches | Required. Boolean. |
| preserved | Preserved | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"token": "F-001",
"prefix": "F-",
"expectedLength": 5
},
"output": {
"prefixMatches": true,
"lengthMatches": true,
"preserved": "F-001"
}
} Limitations and assumptions
- An empty prefix matches every string; no character vocabulary, field identity, checksum or external registry is validated.
- 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
Validate the complete source message and authoritative identifier scheme before merging records or asserting standards compatibility.
References
-
Calculation and input contract: agroinformatics/field-id-check-token — tool.io
-
Unicode 17.0: core specification, encoding forms — Unicode Consortium
Similar or alternative tools
- Field ID Leading Zero Budget
Return leading-zero counts and identifier collision groups.
- Field ID Split Parent Reference
Qualify an explicit field-parent split reference without altering boundaries.