Skip to content

Main content

Parsing: Ini Key Assignment Delimiter Position Tool

Locate the first explicitly allowed equals/colon delimiter in one restricted unquoted INI key line; no sections, escaped delimiters, comments or continuation syntax.

Loading tool…

Description

Locate the first explicitly allowed equals/colon delimiter in one restricted unquoted INI key line; no sections, escaped delimiters, comments or continuation syntax.

INI-style configuration formats share section, assignment, and comment conventions but differ across implementations. Delimiters and whitespace policies need to be explicit, especially inside quoted or escaped values. A local split or prefix check should be interpreted under its stated dialect.

Locate the first explicitly allowed equals/colon delimiter in one restricted unquoted INI key line; no sections, escaped delimiters, comments or continuation syntax.

When to use this tool

Use Parsing: Ini Key Assignment Delimiter Position when you need this specific INI-style assignment, section, or comment check under an explicit policy.

How to use the tool and how it works

  1. Enter line, allowedDelimiters. 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 result. Expand result to inspect the returned fields.

Require allowedDelimiters to contain only one or more = or : characters and a line without CR/LF or a leading comment/section marker. Find the first permitted delimiter at a UTF-16 offset, trim the preceding key, and preserve rawValue after it. If absent, return offset=-1, delimiter="", trimmed whole-line key, and rawValue="" inside result.1

Input fieldMeaning and unitsAccepted input
lineOne supplied line under the stated newline policy.Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
allowedDelimitersAllowed DelimitersRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultObject containing the calculated result members described below.Required. Object.
result.delimiterOffsetZero-based UTF-16 offset, or -1 for no delimiter.Calculated result member: number.
result.delimiterDelimiterCalculated result member: string.
result.keyKeyCalculated result member: string.
result.rawValueUntrimmed text after the first delimiter, or empty if absent.Calculated result member: string.
json
{
  "input": {
    "line": " key : a=b",
    "allowedDelimiters": "=:"
  },
  "output": {
    "result": {
      "delimiterOffset": 5,
      "delimiter": ":",
      "key": "key",
      "rawValue": " a=b"
    }
  }
}

Limitations and assumptions

  • Empty keys and delimiter-free lines can succeed. No quote/escape awareness, inline comment stripping, key validation, interpolation, or full INI dialect is implemented.
  • Outputs are nested inside result. 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.

Alternative or Complementary methods

Choose the target application's INI dialect for a complete configuration parser. Verify quoting, comments, interpolation, duplicate keys, and section state beyond one local split.

References

  1. Calculation and input contract: parse/ini-key-assignment-delimiter-position — tool.io

Similar or alternative tools