File indexing completed on 2024-05-12 15:50:07
0001 /* 0002 SPDX-FileCopyrightText: 2007 Sebastian Pipping <webmaster@hartwork.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_H 0008 #define KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_H 0009 0010 #include "ksyntaxhighlighting_export.h" 0011 0012 #include <QStringView> 0013 0014 namespace KSyntaxHighlighting 0015 { 0016 namespace WildcardMatcher 0017 { 0018 /** 0019 * Matches a string against a given wildcard case-sensitively. 0020 * The wildcard supports '*' (".*" in regex) and '?' ("." in regex), not more. 0021 * 0022 * @param candidate Text to match 0023 * @param wildcard Wildcard to use 0024 * @return True for an exact match, false otherwise 0025 * 0026 * @since 5.86 0027 */ 0028 KSYNTAXHIGHLIGHTING_EXPORT bool exactMatch(QStringView candidate, QStringView wildcard); 0029 } 0030 0031 } 0032 0033 #endif // KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_H