Function isValidMimeTypeName

Check if name is valid MIME type name.

bool isValidMimeTypeName (
  scope const(char)[] name
) pure nothrow @nogc @safe;

Example

assert( isValidMimeTypeName("text/plain"));
assert( isValidMimeTypeName("text/plain2"));
assert( isValidMimeTypeName("text/vnd.type"));
assert( isValidMimeTypeName("x-scheme-handler/http"));
assert(!isValidMimeTypeName("not mime type"));
assert(!isValidMimeTypeName("not()/valid"));
assert(!isValidMimeTypeName("not/valid{}"));
assert(!isValidMimeTypeName("text/"));
assert(!isValidMimeTypeName("/plain"));
assert(!isValidMimeTypeName("/"));