Add java load aliases for the unaware

This commit is contained in:
Mike Bierlee 2022-10-13 01:58:26 +03:00
parent 9eac0515a1
commit 6661ef73b4
2 changed files with 8 additions and 1 deletions

View file

@ -14,3 +14,4 @@
- Case insensitive properties and sections
- Escape characters
- Support multi-line values with backslash
- Example

View file

@ -46,6 +46,9 @@ ConfigDictionary parseJavaProperties(const string properties) {
return new JavaPropertiesFactory().parseConfig(properties);
}
/// ditto
alias parseJavaConfig = parseJavaProperties;
/**
* Load a Java properties file from disk.
*
@ -57,6 +60,9 @@ ConfigDictionary loadJavaProperties(const string filePath) {
return new JavaPropertiesFactory().loadFile(filePath);
}
/// ditto
alias loadJavaConfig = loadJavaProperties;
version (unittest) {
import std.exception : assertThrown;
import std.process : environment;
@ -108,7 +114,7 @@ version (unittest) {
@("Values and keys are trimmed")
unittest {
auto config = parseJavaProperties("
auto config = parseJavaConfig("
one = money
");