typesFileReader

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

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

Return Value

Type: auto

Range of mime type names.

Throws

Examples

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

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

Meta