Import std.data.ini
std.data.ini
Ini: INI files' sections of keys and values, read into an Object and written from one. Each
line, which ends with LF, CRLF, or a CR alone, is a [section] header, a key = value or
key: value, a comment, which starts with ';' or '#', or blank. A key and its value have the
spaces around them trimmed, and a value in '"'s keeps the spaces inside them, without the '"'s.
The keys before any section are the Object's own, as Strings, and each section is an Object of
its keys' values, as Strings. INI has no standard; this is the form most programs read.
std/data/ini.fb
Types
Ini
struct
Public Struct Ini
What reads and writes INI files, in its Static Methods.
-
The keys and sections
textholds. A key given again in a section takes its new value, and a section named again goes on adding to the first. Throws a ParseError of SYNTAX, with its line and column, for a line that's none of the four, a key that's empty, a header that doesn't end with ']', or a section named as a key before it is. -
value, an Object, as INI: its own keys whose values aren't Objects, then a section for each Object in it, of its keys. A String is written as it is, in '"'s when it starts or ends with a space, a tab, or a '"', a Bool, an integer, or a Double as its text, and Null as nothing. Panics at what Read wouldn't read back as the same: whenvalueisn't an Object, a section holds an Object or anything holds an Array, a key is empty, holds '=', ':', or a line break, starts with '[', ';', '#', or a byte order mark, or starts or ends with a space or a tab, a section's name holds ']' or a line break or starts or ends with a space or a tab, or a value holds a line break.
Report an issue with this page or with FutureBlitz on GitHub.