Re: New draft of SRFI 130: Cursor-based string library William D Clinger 21 May 2016 17:36 UTC
John Cowan wrote: > I'll patch it up this evening. If you're repairing SRFI 130 itself, I have a couple more corrections. The example given for string-for-each-cursor is incorrect. It calls string-ref with a cursor as second argument, so that should be a call to string-ref/cursor. It is also missing the last line of the expression, which was probably a copy error. The expression should be (let ((s "abcde") (v '())) (string-for-each-cursor (lambda (cur) (set! v (cons (char->integer (string-ref/cursor s cur)) v))) s) v) In the description of string-index, second paragraph, it should be possible to improve upon "a same half-open interval [start,end) in these procedures that they do in all the other SRFI 130 procedures." It might be good to have an incompatibility note for the four procedures starting with string-index, saying they are not compatible with the SRFI 13 procedures of the same names because the SRFI 13 procedures sometimes return false. The compatibility note for string-replicate refers to "the string-replicate procedure of SRFI 13", but there's no such thing. I think it should refer to the xsubstring procedure of SRFI 13. Will