Skip to content

Main content

Toml Literal String Quote Count Tool

Identify the one-quote or three-quote opening delimiter of a TOML literal string, including empty literals; this does not parse a complete TOML document.

Loading tool…

Description

Identify the one-quote or three-quote opening delimiter of a TOML literal string, including empty literals; this does not parse a complete TOML document.

TOML keys and values have distinct bare, quoted, literal-string, and date/time rules. A dotted key consists of segments, and quote prefixes alone do not prove a valid complete string. A local recognizer can intentionally support a smaller grammar than the full language.

Identify the one-quote or three-quote opening delimiter of a TOML literal string, including empty literals; this does not parse a complete TOML document.

When to use this tool

Use Toml Literal String Quote Count when you need to inspect one supported TOML-related prefix, key segment, or separator.

How to use the tool and how it works

  1. Enter token. 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 multiline, quoteCount. Inspect multiline before interpreting the associated values.

Require token to start with one single quote or three single quotes. Return quoteCount=3 for the triple prefix, otherwise one, and multiline accordingly.1

Input fieldMeaning and unitsAccepted input
tokenComplete literal token in the grammar stated above.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
multilineMultilineRequired. Boolean.
quoteCountOpening quote-prefix width only; does not confirm closing quotes.Required. Safe integer.
json
{
  "input": {
    "token": "'text'"
  },
  "output": {
    "multiline": false,
    "quoteCount": 1
  }
}

Limitations and assumptions

  • Only the opening prefix is inspected. Closing quotes, content restrictions, line-ending normalization, and complete TOML literal-string validity are not checked.
  • 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

Use a full TOML parser for complete keys, string escapes, dates, duplicate definitions, and document semantics. Keep this tool's restricted grammar distinct from the language specification.

References

  1. Calculation and input contract: parse/toml-literal-string-quote-count — tool.io

Similar or alternative tools