aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 2b1b605d3100df81d2ce71ac932fc5461f3b2992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
libproperties
=============

A simple library to parse properties. The rules for the format are as follows:

* Entries are generally expected to be a single line of the form, one of the
following:

	* propertyName=propertyValue
	* propertyName:propertyValue

* White space that appears between the property name and property value is
ignored, so the following are equivalent.

	* name=Stephen
	* name = Stephen

White space at the beginning of the line is also ignored.

* Lines that start with the comment characters `!` or `#` are ignored. Blank
lines are also ignored.

* A property value can span several lines if each line is terminated by a
backslash (‘\’) character. For example:

```
targetCities=\
        Detroit,\
        Chicago,\
        Los Angeles
```

This is equivalent to `targetCities=Detroit,Chicago,Los Angeles` (white space
at the beginning of lines is ignored).

* The characters _newline_, _carriage return_, and _tab_ can be inserted with
characters `\n`, `\r`, and `\t`, respectively.

* The backslash character must be escaped as a double backslash. For example:

```
path=c:\\docs\\doc1
```

* UNICODE characters can be entered as they are in a Java program, using the
`\u` prefix. For example, `\u002c`.

## TODOs
* Able to write comments with `!` symbol.
* Multiline values.
* `\u` prefix.