Skip to content

Main content

Paired Punctuation Opening Closing Code Point Tool

Compute paired punctuation opening closing code point from explicit bounded inputs.

Loading tool…

Description

Look up a one-character symbol among the four ASCII round, square, curly, and angle bracket pairs.

Text positions can be measured in UTF-16 code units, Unicode code points, grapheme clusters, or modeled display columns. These coordinates are not interchangeable. Invisible markers and delimiter policies can also affect interpretation even when a string looks unchanged, so the chosen representation needs to stay explicit.

Look up a one-character symbol among the four ASCII round, square, curly, and angle bracket pairs.

When to use this tool

Use Paired Punctuation Opening Closing Code Point when you need the stated marker, coordinate, delimiter, or normalization operation under an explicit text representation.

How to use the tool and how it works

  1. Enter symbol. 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 partner, opening, known. Inspect opening, known before interpreting the associated values.

Look up a one-character symbol among the four ASCII round, square, curly, and angle bracket pairs. Return partner, opening, and known, using empty partner and false flags when unknown.1

Input fieldMeaning and unitsAccepted input
symbolOne UTF-16 code unit; lookup covers only four ASCII bracket pairs.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
partnerPartnerRequired. Text; maximum UTF-16 length 8192.
openingOpeningRequired. Boolean.
knownWhether the tool treats the supplied category as known under its stated rule.Required. Boolean.
json
{
  "input": {
    "symbol": "("
  },
  "output": {
    "partner": ")",
    "opening": true,
    "known": true
  }
}

Limitations and assumptions

  • The input length is one UTF-16 unit. This is not a complete Unicode paired-bracket table, balancing parser, or bidirectional bracket-resolution algorithm.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.

Alternative or Complementary methods

Choose the coordinate system required by the consumer. Use a full parser, renderer, or segmentation method when a local marker or delimiter rule cannot determine the complete text behavior.

References

  1. Calculation and input contract: text/paired-punctuation-opening-closing-code-point — tool.io

Similar or alternative tools

  • Unicode Variation Selector Code Point Tag

    Classify a valid scalar within U+FE00–FE0F or U+E0100–E01EF and return selector, supplementary, and ordinal one through 256 across those ranges; use ordinal zero otherwise.

  • Inline Code Backtick Run Padding

    Add one ASCII space at both edges of code when it starts or ends with a backtick, or has spaces at both ends while containing a non-space character.