DesktopFile.splitValues

Some keys can have multiple values, separated by semicolon. This function helps to parse such kind of strings into the range.

class DesktopFile
@trusted static
splitValues
(
string values
)

Return Value

Type: auto

The range of multiple nonempty values. Note: Returned range unescapes ';' character automatically.

Examples

assert(DesktopFile.splitValues("").empty);
assert(DesktopFile.splitValues(";").empty);
assert(DesktopFile.splitValues(";;;").empty);
assert(equal(DesktopFile.splitValues("Application;Utility;FileManager;"), ["Application", "Utility", "FileManager"]));
assert(equal(DesktopFile.splitValues("I\\;Me;\\;You\\;We\\;"), ["I;Me", ";You;We;"]));

Meta