Description
Apply an explicitly supplied leading-horizontal-whitespace policy for full-line INI comments.
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.
Apply an explicitly supplied leading-horizontal-whitespace policy for full-line INI comments.
When to use this tool
Use Ini Comment Leading Space Policy 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
- Enter line, allowLeadingSpace. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read comment, marker. Inspect comment before interpreting the associated values.
Optionally remove leading ASCII spaces and tabs when allowLeadingSpace. Return comment when the resulting line starts with ; or # and marker as that character, otherwise an empty marker.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| line | One supplied line under the stated newline policy. | Required. Text; maximum UTF-16 length 8192. |
| allowLeadingSpace | Allow Leading Space | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| comment | Comment | Required. Boolean. |
| marker | Marker | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"line": " ; note",
"allowLeadingSpace": true
},
"output": {
"comment": true,
"marker": ";"
}
} Limitations and assumptions
- Only the prefix is checked. Other Unicode whitespace, inline comments, multiline constructs, and INI-specific quoting or document rules are not parsed.
- 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
Similar or alternative tools
- Ini Section Trailing Comment Token
Return the literal section and text after the marker, or an empty comment.
- Parsing: Ini Key Assignment Delimiter Position
Locate the first explicitly allowed equals/colon delimiter in one restricted unquoted INI key line; no sections, escaped delimiters, comments or continuation syntax.