| The Modular DocBook Stylesheets | ||
|---|---|---|
| Prev | DSSSL Library | Next |
(repl-substring? string target pos)
Returns #t if target occurs at pos in string.
Norman Walsh, <norm@berkshire.net>
(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 |
Copyright © 1997, 1998 Norman Walsh