Whole document tree length-string-number-partSource Code(define (length-string-number-part lenstr) ;; Returns the numeric part of a length string (let ((digits '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\.))) (let loop ((chars (string->list lenstr)) (number-part "")) (if (or (null? chars) (not (member (car chars) digits))) number-part (loop (cdr chars) (string-append number-part (string (car chars)))))))) |