fix `regexp-match-exact?' to work on paths, drop ports from docs
Closes PR 11213
This commit is contained in:
parent
f624ebdf20
commit
9e9a3ef814
|
@ -451,7 +451,13 @@
|
|||
(and m (zero? (caar m))
|
||||
(= (cdar m)
|
||||
(cond [(bytes? s) (bytes-length s)]
|
||||
[(or (byte-regexp? p) (bytes? p)) (string-utf-8-length s)]
|
||||
[else (string-length s)])))))
|
||||
[(or (byte-regexp? p) (bytes? p))
|
||||
(if (path? s)
|
||||
(bytes-length (path->bytes s))
|
||||
(string-utf-8-length s))]
|
||||
[else
|
||||
(if (path? s)
|
||||
(string-length (path->string s))
|
||||
(string-length s))])))))
|
||||
|
||||
)
|
||||
|
|
|
@ -457,7 +457,7 @@ match succeeds, @racket[#f] otherwise.
|
|||
|
||||
|
||||
@defproc[(regexp-match-exact? [pattern (or/c string? bytes? regexp? byte-regexp?)]
|
||||
[input (or/c string? bytes? path? input-port?)])
|
||||
[input (or/c string? bytes? path?)])
|
||||
boolean?]{
|
||||
|
||||
Like @racket[regexp-match?], but @racket[#t] is only returned when the
|
||||
|
|
Loading…
Reference in New Issue
Block a user