Description

A key/value config file format

Package Information

Version1.1.5 (2015-Nov-06)
Homepage http://github.com/Soulsbane/variantconfig
Repository https://github.com/Soulsbane/VariantConfig
LicenseBSL-1.0
CopyrightCopyright © 2015, Paul Crane
AuthorsPaul Crane
Registered byPaul Crane
Dependencies none

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

#Description VariantConfig is a key/value config file format that uses an associative array to store key/value pairs.

#Examples

auto config = VariantConfig("app.config");
long number = config["number"].toLong;
bool aBool = config["aBool"].toBool;
string text = config["sentence"].toStr;

config["opTest"] = "Does it work";
config["opNum"] = 90210;
config["aBool"] = true;

#File Contents

TodoTaskPattern=([A-Z]+):(.*)
aBool=true
equalsText=([A-Z]+):(.*)
float=3443.443
foo=bar
number=12071
opNum=90210
opTest=Does it work
sentence=This is a really long sentence to test for a really long value string!
spacetest=this is testing starting and trailing spaces
testfield=123466
time=12:04

Available versions

1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 ~master ~version2 ~develop