inilike

Undocumented in source.

Members

Classes

IniLikeException
class IniLikeException

Exception thrown on the file read error.

IniLikeFile
class IniLikeFile
Undocumented in source.
IniLikeGroup
class IniLikeGroup
Undocumented in source.

Functions

currentLocale
string currentLocale()

Retrieves current locale probing environment variables LC_TYPE, LC_ALL and LANG (in this order)

doUnescape
string doUnescape(string value, Tuple!(char, char)[] pairs)
Undocumented in source. Be warned that the author may not have intended to support it.
escapeValue
string escapeValue(string value)

Escapes string by replacing special symbols with escaped sequences. These symbols are: '\\' (backslash), '\n' (newline), '\r' (carriage return) and '\t' (tab). Note: Currently the library stores values as they were loaded from file, i.e. escaped. To keep things consistent you should take care about escaping the value before inserting. The library will not do it for you.

iniLikeFileReader
auto iniLikeFileReader(string fileName)
Undocumented in source. Be warned that the author may not have intended to support it.
iniLikeRangeReader
auto iniLikeRangeReader(Range byLine)
Undocumented in source. Be warned that the author may not have intended to support it.
iniLikeStringReader
auto iniLikeStringReader(string contents)
Undocumented in source. Be warned that the author may not have intended to support it.
isBoolean
bool isBoolean(string value)

Check if the desktop entry value can be interpreted as boolean value.

isFalse
bool isFalse(string value)

Tells whether the desktop entry value presents false

isTrue
bool isTrue(string value)

Tells whether the dekstop entry value presents true

isValidKey
bool isValidKey(string key)

Tells whethe the string is valid dekstop entry key. Note: This does not include characters presented in locale names. Use separateFromLocale to get non-localized key to pass it to this function

isValidKeyChar
bool isValidKeyChar(char c)

Tells whether the character is valid for desktop entry key. Note: This does not include characters presented in locale names.

localizedKey
string localizedKey(string key, string locale)

Constructs localized key name from key and locale.

localizedKey
string localizedKey(string key, string lang, string country, string modifier)

Ditto, but constructs locale name from arguments.

makeLocaleName
string makeLocaleName(string lang, string country, string encoding, string modifier)

Makes locale name based on language, country, encoding and modifier.

parseLocaleName
auto parseLocaleName(string locale)

Parses locale name into the tuple of 4 values corresponding to language, country, encoding and modifier

separateFromLocale
Tuple!(string, string) separateFromLocale(string key)

Separates key name into non-localized key and locale name. If key is not localized returns original key and empty string.

unescapeExec
string unescapeExec(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
unescapeValue
string unescapeValue(string value)

Unescapes string. You should unescape values returned by library before displaying until you want keep them as is (e.g., to allow user to edit values in escaped form).

Structs

IniLikeLine
struct IniLikeLine
Undocumented in source.

Meta