common: use fnmatch() for pattern matching

Drop-in POSIX-compliant function that has a nice glob(7) manual page for
reference.
This commit is contained in:
Consus 2023-10-01 14:39:47 +03:00 committed by Johan Malm
parent e864419194
commit 3e5b988d38
2 changed files with 6 additions and 11 deletions

View file

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_MATCH_H
#define LABWC_MATCH_H
#include <glib.h>
#include <stdbool.h>
/**
@ -10,6 +10,6 @@
* @string: String to search.
* Note: Comparison case-insensitive.
*/
bool match_glob(const gchar *pattern, const gchar *string);
bool match_glob(const char *pattern, const char *string);
#endif /* LABWC_MATCH_H */