MimeGlob.isSuffix

Check if glob pattern is suffix, i.e. starts with '*' and does not have special glob match characters in the rest of pattern.

  1. bool isSuffix()
  2. bool isSuffix(string pattern)
    struct MimeGlob
    @nogc @safe static nothrow pure
    bool
    isSuffix
    (
    scope string pattern
    )

Examples

assert(isSuffix("*.jpg"));
assert(!isSuffix(""));
assert(!isSuffix("*"));
assert(!isSuffix("*dir[0-9]"));

Meta