chiark
/
gitweb
/
~mdw
/
mLib-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bres: Ooops, this one was rather buggy.
[mLib-python]
/
str.pyx
diff --git
a/str.pyx
b/str.pyx
index 7ec1ed4f15cbb5c6210634f3b0a730b1195982a5..b7d80e682f7c75505a10fe93fd479dd8c13023f4 100644
(file)
--- a/
str.pyx
+++ b/
str.pyx
@@
-76,8
+76,11
@@
def split(char *p, int n = -1, quotep = False):
xfree(op)
return l, r
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
def sanitize(char *p, int n = -1):
cdef char *buf