Function subclassesFileReader
Parse mime/subclasses file by line ignoring empty lines and comments.
auto auto subclassesFileReader(Range)
(
Range byLine
)
if (isInputRange!Range && is(ElementType!Range : string));
Returns
Range of SubclassLine
tuples.
Throws
MimeFileException
on parsing error.
Example
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");