Skip to content

Instantly share code, notes, and snippets.

@garlic0x1
Created January 29, 2024 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garlic0x1/20a2c5485714e394d5151d6c4e6fdf01 to your computer and use it in GitHub Desktop.
Save garlic0x1/20a2c5485714e394d5151d6c4e6fdf01 to your computer and use it in GitHub Desktop.
Glob match with CFFI
(cffi:defcfun ("fnmatch" fnmatch) :int
(pattern :string)
(string :string)
(flags :int))
(defun glob-match (pattern string &optional (flags 4))
(= 0 (fnmatch pattern string flags)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment