Description
Inspect an explicitly selected UTF-16 delimiter position under a repeated single-character escape parity convention.
Parsing depends on the chosen grammar, character encoding, offset unit, and treatment of escapes and delimiters. UTF-16 code-unit positions, Unicode code points, and UTF-8 byte offsets are not interchangeable. A boundary or token check supplies one part of a parser rather than validating an entire file.
Inspect an explicitly selected UTF-16 delimiter position under a repeated single-character escape parity convention.
When to use this tool
Use Escaped Delimiter Parity when you need the stated token boundary, offset, prefix, delimiter, or count component inside a larger parsing workflow.
How to use the tool and how it works
- Enter text, delimiterOffset, escapeCharacter. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read precedingEscapes, escaped. Inspect escaped before interpreting the associated values.
For a valid zero-based UTF-16 delimiterOffset and a one-code-unit escapeCharacter count immediately preceding copies of that character. Return precedingEscapes and escaped when the count is odd.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| text | Supplied text under the stated token or offset convention. | Required. Text; maximum UTF-16 length 8192. |
| delimiterOffset | Zero-based UTF-16 position; the character there is not verified as a delimiter. | Required. Safe integer; minimum 0. |
| escapeCharacter | Exactly one UTF-16 code unit, not an astral character. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| precedingEscapes | Preceding Escapes | Required. Safe integer. |
| escaped | Escaped | Required. Boolean. |
{
"input": {
"text": "a\\,b",
"delimiterOffset": 2,
"escapeCharacter": "\\"
},
"output": {
"precedingEscapes": 1,
"escaped": true
}
} Limitations and assumptions
- The character at delimiterOffset is not checked to be a delimiter. Parity is a supplied grammar convention, not a complete quote/context-aware escape parser; astral escape characters are unsupported.
- 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. Signed zero is exported as zero.
Alternative or Complementary methods
Choose a parser for the intended complete grammar when context, nesting, encodings, or semantic validation matters. Keep byte, code-unit, and code-point coordinates explicit when combining results.
References
Similar or alternative tools
- Properties Continuation Odd Backslash Flag
Count consecutive trailing backslashes and return continued when the count is odd.
- Delimiter Overlap Prefix Length
Find the longest suffix of one literal delimiter that is a prefix of the next, measured in UTF-16 units.