added a couple of docs

This commit is contained in:
Abdulaziz Ghuloum 2006-12-03 09:05:24 -05:00
parent df16339018
commit 99757011a6
1 changed files with 20 additions and 4 deletions

View File

@ -147,7 +147,15 @@
(let ([i ($fxsub1 i)]) (let ([i ($fxsub1 i)])
(f x i (cons ($string-ref x i) ac)))])))) (f x i (cons ($string-ref x i) ac)))]))))
#|procedure:string=?
synopsis:
(string=? s s* ...)
description:
string=? takes 1 or more strings and returns #t if all strings are
equal. Two strings s1 and s2 are string=? if they have the same
length and if (char=? (string-ref s1 i) (string-ref s2 i)) for all
0 <= i < (string-length s1)
|#
(let () (let ()
(define bstring=? (define bstring=?
(lambda (s1 s2 i j) (lambda (s1 s2 i j)
@ -188,8 +196,16 @@
(strings=? s s* ($string-length s)) (strings=? s s* ($string-length s))
(err s))]))) (err s))])))
#|procedure:string-append
synopsis:
(string-append str ...)
description:
Takes 0 or more strings and returns a new string that results from
appending the contents of the strings together.
reference-implementation:
(define (string-append . s*)
(list->string (apply append (map string->list s*))))
|#
(let () (let ()
;; FIXME: make nonconsing on 0,1,2, and 3 args ;; FIXME: make nonconsing on 0,1,2, and 3 args
(define length* (define length*
@ -222,7 +238,7 @@
(let ([s ($make-string n)]) (let ([s ($make-string n)])
(fill-strings s s* 0)))))) (fill-strings s s* 0))))))
#|procedure:substring #|procedure:substring
(substring str i j) (substring str i j)
Returns a substring of str starting from index i (inclusive) Returns a substring of str starting from index i (inclusive)
and ending with index j (exclusive).|# and ending with index j (exclusive).|#