subclassesFileReader

Parse mime/subclasses file by line ignoring empty lines and comments.

subclassesFileReader
(
Range
)
(
Range byLine
)
if (
isInputRange!Range &&
is(ElementType!Range : string)
)

Return Value

Type: auto

Range of SubclassLine tuples.

Throws

Examples

string[] lines = ["application/javascript application/ecmascript", "text/x-markdown text/plain"];
auto expected = [SubclassLine("application/javascript", "application/ecmascript"), SubclassLine("text/x-markdown", "text/plain")];
assert(equal(subclassesFileReader(lines), expected));

assertThrown!MimeFileException(subclassesFileReader(["application/javascript"]).array, "must throw");

Meta