Skip to content

Main content

Escaped Delimiter Parity Tool

Inspect an explicitly selected UTF-16 delimiter position under a repeated single-character escape parity convention.

Loading tool…

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

  1. Enter text, delimiterOffset, escapeCharacter. 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 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 fieldMeaning and unitsAccepted input
textSupplied text under the stated token or offset convention.Required. Text; maximum UTF-16 length 8192.
delimiterOffsetZero-based UTF-16 position; the character there is not verified as a delimiter.Required. Safe integer; minimum 0.
escapeCharacterExactly one UTF-16 code unit, not an astral character.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
precedingEscapesPreceding EscapesRequired. Safe integer.
escapedEscapedRequired. Boolean.
json
{
  "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

  1. Calculation and input contract: parse/escaped-delimiter-parity — tool.io

Similar or alternative tools