#header #fnmatch #binding #header-file #period #slash #matched

sys fnmatch-sys

Rust binding for the C header fnmatch.h

1 stable release

1.0.0 Nov 14, 2020

#3 in #slash

Download history 4/week @ 2024-02-12 34/week @ 2024-02-19 15/week @ 2024-02-26 6/week @ 2024-03-04 16/week @ 2024-03-11 7/week @ 2024-03-18 10/week @ 2024-03-25 38/week @ 2024-04-01

72 downloads per month
Used in 2 crates

MIT/Apache

4KB

fnmatch-sys

Provides a rust ffi link to the C header file fnmatch.h. According to the rust convention, no effort is made to add safe abstractions to the declarations provided.

Building

fnmatch.h is required in CC's build path to link the library.

Declarations provided

    pub static FNM_NOMATCH: c_int; // Match failed.

    pub static FNM_NOESCAPE: c_int; // Disable backslash escpaing.

    pub static FNM_PATHNAME: c_int; // Slash must be matched by slash.

    pub static FNM_PERIOD: c_int; // Period must be matched by period.

    pub fn fnmatch(pattern: *const c_char, string: *const c_char, flags: c_int) -> c_int;

Dependencies

~175KB