Skip to content

Tiny wildcard library written in single h-file without any dependencies

Notifications You must be signed in to change notification settings

QtRoS/wildest-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

*️⃣ Wildest card

Tiny wildcard library written in single h-file without any dependencies

Summary

Features

  • Based on NFA
  • Written in C in single header file
  • Has no dependencies
  • Has no recursion
  • Has no dynamic allocations
  • Has O(MN) complexity
  • Requires O(logM) static memory

Where M is the length of the expression/pattern, N is the length of the string

Example

#include "wildcard.h"
...
bool answer = wildcard("*.cpp", "file.cpp");

Installation

  • Getting the library from source:
git clone https://github.com/QtRoS/wildest-card
  • Setup and compile (meson required):
cd wildest-card &&
meson setup --prefix=/usr --buildtype=release build &&
meson compile -C build
  • Finally, install the library:
meson install -C build

Running tests

meson test -C build

About

Tiny wildcard library written in single h-file without any dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published