updateIni

Adds or updates a value in an INI file.

If the value is already in the INI file, then it is updated in-place; otherwise, a new one is added to the matching section. Setting value to null removes the line if it is present.

Whitespace and comments on other lines are preserved.

  1. void updateIni(S[] lines, S name, S value)
    void
    updateIni
    (
    S
    )
    (
    ref S[] lines
    ,,)
  2. void updateIni(S[] lines, T value)

Parameters

lines S[]

INI file lines (as in parseIni)

name S

fully-qualified name of the value to update (use . to specify section path)

value S

new value to write

Meta