This commit is contained in:
Jan (janneke) Nieuwenhuizen 2021-05-16 13:20:32 +02:00
parent f083b8f133
commit fbd2408260
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 5 additions and 0 deletions

View File

@ -254,6 +254,11 @@
(>= length suffix-length)
(equal? (substring string (- length suffix-length)) suffix))))
(define (string-drop s n)
(cond ((zero? n) s)
((> n 0) (list->string (list-tail (string->list s) n)))
(else s (error "string-drop: not supported: (n s)=" (cons n s)))))
(define (string->number s . rest)
(if (string-prefix? "#x" s) (string->number (string-drop s 2) 16)
(let ((lst (string->list s)))