1 | /* |
2 | SPDX-FileCopyrightText: 2007 Sebastian Pipping <webmaster@hartwork.org> |
3 | |
4 | SPDX-License-Identifier: MIT |
5 | */ |
6 | |
7 | #ifndef KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_H |
8 | #define KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_H |
9 | |
10 | #include "ksyntaxhighlighting_export.h" |
11 | |
12 | #include <QStringView> |
13 | |
14 | namespace KSyntaxHighlighting |
15 | { |
16 | /*! |
17 | * \namespace KSyntaxHighlighting::WildcardMatcher |
18 | * \inheaderfile KSyntaxHighlighting/WildcardMatcher |
19 | * \inmodule KSyntaxHighlighting |
20 | */ |
21 | namespace WildcardMatcher |
22 | { |
23 | /*! |
24 | * Matches a string against a given wildcard case-sensitively. |
25 | * The wildcard supports '*' (".*" in regex) and '?' ("." in regex), not more. |
26 | * |
27 | * \a candidate Text to match |
28 | * |
29 | * \a wildcard Wildcard to use |
30 | * |
31 | * Returns \c true for an exact match, false otherwise |
32 | * |
33 | * \since 5.86 |
34 | */ |
35 | KSYNTAXHIGHLIGHTING_EXPORT bool exactMatch(QStringView candidate, QStringView wildcard); |
36 | } |
37 | |
38 | } |
39 | |
40 | #endif // KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_H |
41 | |