diff options
author | 2024-08-13 11:47:25 +0200 | |
---|---|---|
committer | 2024-08-13 11:47:25 +0200 | |
commit | 182084677363f6f8218ebc216559ceadb89a5e30 (patch) | |
tree | 3198d24ba5220185e6f4e38f39131dd77770758c | |
parent | da2505f7ca3ca8f48caad49d600de9f3f03e33aa (diff) | |
download | properties-182084677363f6f8218ebc216559ceadb89a5e30.tar.gz properties-182084677363f6f8218ebc216559ceadb89a5e30.zip |
Add README.md
-rw-r--r-- | README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..b6ee271 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +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`. |