validateName

private fnvoid validateName(string what, string name, IniPolicy policy)

Saves a var object to INI format into an output range.

Parameters

vThe var object to serialize.
sinkThe output range to write to.
policyConfiguration policy. Validate a key or section name for INI serialization. Keys and section names containing structural characters (`=`, brackets, newlines), names starting with a comment character, empty names, and names with leading/trailing whitespace cannot round-trip through the INI format and are rejected at write time rather than silently corrupted.

Params: what = Description of the validated item ("key" or "section name"). name = The name to validate.

Throws

Exception if name is not representable in the INI format.