Function typesFileReader

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

auto auto typesFileReader(Range) (
  Range byLine
)
if (isInputRange!Range && is(ElementType!Range : string));

Returns

Range of mime type names.

Throws

MimeFileException on parsing error.

Example

string[] lines = ["#comment", "", "application/x-md2", "application/x-md3"];
assert(equal(lines[2..$], typesFileReader(lines)));

assertThrown(typesFileReader(["notmimetype"]).array, "must throw");