(guarantee-vector-8b guarantee-string)
(set-vector-8b-length! set-string-length!)
(vector-8b-length string-length)
- (vector-8b-maximum-length string-maximum-length)
(vector-8b? string?)
error:not-string
guarantee-string
(guarantee-vector-8b guarantee-string)
(set-vector-8b-length! set-string-length!)
(vector-8b-length string-length)
- (vector-8b-maximum-length string-maximum-length)
(vector-8b? string?)
error:not-string
guarantee-string
string-match-backward-ci
string-match-forward
string-match-forward-ci
- string-maximum-length
string-pad-left
string-pad-right
string-replace
ascii
(integer->char ascii))))
-(define (string-maximum-length string)
- (guarantee-string string 'STRING-MAXIMUM-LENGTH)
- (fix:- (fix:lsh (fix:- (system-vector-length string) 1)
- %words->octets-shift)
- 1))
-
-(define %octets->words-shift
- (let ((chars-per-word (vector-ref (gc-space-status) 0)))
- (case chars-per-word
- ((4) -2)
- ((8) -3)
- (else (error "Can't support this word size:" chars-per-word)))))
-
-(define %words->octets-shift
- (- %octets->words-shift))
-
(define (reverse-string string)
(guarantee-string string 'REVERSE-STRING)
(%reverse-substring string 0 (string-length string)))