IniSection

Represents ini section

Constructors

this
this(string name)

Creates new IniSection instance

this
this(string name, IniSection* parent)

Creates new IniSection instance

Members

Aliases

opCall
alias opCall = getKey

Gets key value

opIndex
alias opIndex = getSection

Returns reference to section

Functions

addSection
void addSection(ref IniSection section)

Adds section

getKey
string getKey(string name)

Gets key value

getParent
IniSection* getParent()

Section parent

getSection
IniSection getSection(string name)

Returns reference to section

getSectionEx
IniSection getSectionEx(string name)

Returns section by name in inheriting(names connected by dot)

hasKey
bool hasKey(string name)

Checks if specified key exists

hasParent
bool hasParent()

Checks if current section has parent

hasSection
bool hasSection(string name)

Checks if specified section exists

inherit
void inherit(IniSection sect)

Inherits keys from section

keys
string[string] keys()

Array of keys

name
string name()

Section name

parse
void parse(string filename, bool doLookups = true)

Parses filename

parseLookups
void parseLookups()

Parses lookups

removeKey
void removeKey(string name)

Removes key

removeSection
void removeSection(string name)

Removes section

root
IniSection root()

Root section

sections
IniSection[] sections()

Array of sections

setKey
void setKey(string name, string value)

Sets section key

setParent
void setParent(ref IniSection parent)

Moves current section to another one

split
T[] split(T txt, S delim, int limit)

Splits string by delimeter with limit

Static functions

Parse
Ini Parse(string filename)

Parses Ini file

Variables

_keys
string[string] _keys;

Keys

_name
string _name;

Section name

_parent
IniSection* _parent;

Parent Null if none

_sections
IniSection[] _sections;

Childs

Examples

Ini ini = Ini.Parse("path/to/your.conf");
string value = ini.getKey("a");

Meta