A C library to Open a path or URL with the system-defined program.
git clone https://github.com/thechampagne/libwildmatch.git
cd libwildmatch
cargo build
#include <assert.h>
int main()
{
assert(wildmatch_matches("cat", "cat") != 0);
assert(wildmatch_matches("*cat*", "dog_cat_dog") != 0);
assert(wildmatch_matches("c?t", "cat") != 0);
assert(wildmatch_matches("c?t", "cot") != 0);
assert(wildmatch_matches("dog", "cat") == 0);
assert(wildmatch_matches("*d", "cat") == 0);
assert(wildmatch_matches("????", "cat") == 0);
assert(wildmatch_matches("?", "cat") == 0);
return 0;
}
This repo is released under the MIT.