correcting an offset error: if the string str is exactly n characters long, the use of string-ref in the last case will die.
This commit is contained in:
parent
83e7f92250
commit
37a81bcfce
|
@ -112,7 +112,7 @@
|
|||
;; are eaten in the process.
|
||||
(define (wrap-to-count str n)
|
||||
(cond
|
||||
[(< (string-length str) n) (list str)]
|
||||
[(<= (string-length str) n) (list str)]
|
||||
[(regexp-match-positions #rx"\n" str 0 n)
|
||||
=>
|
||||
(λ (posn)
|
||||
|
|
Loading…
Reference in New Issue
Block a user