diff options
Diffstat (limited to 'strsrch.scm')
-rw-r--r-- | strsrch.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/strsrch.scm b/strsrch.scm index 13edb65..7773e51 100644 --- a/strsrch.scm +++ b/strsrch.scm @@ -6,7 +6,7 @@ ; This code is in the public domain. ;;;@ Return the index of the first occurence of chr in str, or #f -(define (string-index str chr) +(define (strsrch:string-index str chr) (define len (string-length str)) (do ((pos 0 (+ 1 pos))) ((or (>= pos len) (char=? chr (string-ref str pos))) @@ -34,7 +34,7 @@ (cond ((zero? patlen) 0) ; trivial match ((>= patlen strlen) (and (= patlen strlen) (string=? pat str) 0)) ;; use faster string-index to match a single-character pattern - ((= 1 patlen) (string-index str (string-ref pat 0))) + ((= 1 patlen) (strsrch:string-index str (string-ref pat 0))) ((or (<= strlen (+ patlen patlen (quotient char-code-limit 2))) (<= patlen 4)) (subloop pat patlen str strlen char=?)) @@ -55,7 +55,7 @@ (define strlen (string-length str)) (cond ((zero? patlen) 0) ; trivial match ((>= patlen strlen) (and (= patlen strlen) (string-ci=? pat str) 0)) - ((= 1 patlen) (string-index-ci str (string-ref pat 0))) + ((= 1 patlen) (strsrch:string-index-ci str (string-ref pat 0))) ((or (<= strlen (+ patlen patlen (quotient char-code-limit 2))) (<= patlen 4)) (subloop pat patlen str strlen char-ci=?)) |