/src/dovecot/src/lib/wildcard-match.h
Line | Count | Source |
1 | | #ifndef WILDCARD_MATCH_H |
2 | | #define WILDCARD_MATCH_H |
3 | | |
4 | | /* Returns TRUE if mask matches data. mask can contain '*' and '?' wildcards. */ |
5 | | bool wildcard_match(const char *data, const char *mask); |
6 | | /* Like wildcard_match(), but match ASCII characters case-insensitively. */ |
7 | | bool wildcard_match_icase(const char *data, const char *mask); |
8 | | |
9 | | /* Returns TRUE if mask does *not* contain any '*' or '?' wildcards. */ |
10 | | static inline bool wildcard_is_literal(const char *mask) |
11 | 0 | { |
12 | 0 | return strpbrk(mask, "*?") == NULL; |
13 | 0 | } Unexecuted instantiation: event-filter.c:wildcard_is_literal Unexecuted instantiation: event-filter-parser.c:wildcard_is_literal Unexecuted instantiation: wildcard-match.c:wildcard_is_literal |
14 | | |
15 | | bool wildcard_match_escaped(const char *data, const char *mask); |
16 | | bool wildcard_match_escaped_icase(const char *data, const char *mask); |
17 | | /* Returns TRUE if mask does *not* contain any '*' or '?' wildcards, except |
18 | | preceded by '\' escape character. */ |
19 | | bool wildcard_is_escaped_literal(const char *mask); |
20 | | |
21 | | /* Same as str_escape(), but also escape '*' and '?' characters. */ |
22 | | const char *wildcard_str_escape(const char *str); |
23 | | |
24 | | #endif |