| repl-substring? | ||
|---|---|---|
| Prev | Next | |
(repl-substring? string target pos)
Returns #t if target occurs at pos in string.
Norman Walsh, <ndw@nwalsh.com>
(define (repl-substring? string target pos)
;; Returns true if the specified substring can be replaced
(let* ((could-match (<= (+ pos (string-length target))
(string-length string)))
(match (if could-match
(substring string pos (+ pos (string-length target))) "")))
(and could-match (string=? match target))))| Prev | Home | Next |
| repl-substring | Up | sgml-root-element |