Skip to content
/ glob.h Public

Simple Header-Only Implementation of Glob Matching

License

Notifications You must be signed in to change notification settings

tsoding/glob.h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Header-Only Implementation of Glob Matching

Usage

#define GLOB_IMPLEMENTATION
#include "glob.h"

// Your custom UTF8 decode. Check test_glob.c for an example of that.
uint32_t *decode_utf8(const char *message);

int main(void)
{
    if (glob(decode_utf8("*.c"), decode_utf8("main.c")) == GLOB_MATCHED) {
        printf("OK\n");
    } else {
        printf("FAIL\n");
    }
    return 0;
}

Testing

$ ./build.sh
$ ./test_glob

Coverage

Very useful to see what's not tested yet. Requires clang.

$ ./coverage.sh

About

Simple Header-Only Implementation of Glob Matching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published