X-Git-Url: https://git.distorted.org.uk/~mdw/mLib-python/blobdiff_plain/6a6bd8fac21d06b426006a5e92f6e2696590a435..b170d65aecec439b1ca2dd52f60f47f547d365e3:/str.pyx diff --git a/str.pyx b/str.pyx index 7ec1ed4..b7d80e6 100644 --- a/str.pyx +++ b/str.pyx @@ -76,8 +76,11 @@ def split(char *p, int n = -1, quotep = False): xfree(op) return l, r -def match(char *p, char *s): - return _tobool(str_match(p, s)) +def match(char *p, char *s, prefixp = False): + cdef unsigned f + if prefixp: + f = f | STRF_PREFIX + return _tobool(str_matchx(p, s, f)) def sanitize(char *p, int n = -1): cdef char *buf