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
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| token | Complete literal token in the grammar stated above. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| multiline | Multiline | Required. Boolean. |
| quoteCount | Opening quote-prefix width only; does not confirm closing quotes. | Required. Safe integer. |
{
"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
Similar or alternative tools
- Toml Dotted Key Single Segment
Decode one supported bare or JSON-style double-quoted TOML key segment.
- Yaml Block Scalar Chomping Token
Return style=literal or folded and chomping=keep for +, strip for -, or clip when absent.