substring, after Bjolang's rename of substring/cursors

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
Linus Björnstam 2026-10-05 09:02:15 +02:00
parent 1ef2489224
commit 16278c2c92

View file

@ -1757,7 +1757,7 @@ A cursor is a position in a string. It is as cheap as an int, but it always sits
(let* ((start (string-cursor-start s))
(rest (string-cursor-next s start)))
(string-append (char->string (char-upcase (string-cursor-ref s start)))
(substring/cursors s rest (string-cursor-end s))))))
(substring s rest (string-cursor-end s))))))
(capitalise "ölstuga") ;; "Ölstuga"
@ -1765,7 +1765,7 @@ A cursor is a position in a string. It is as cheap as an int, but it always sits
(: first-word (-> string string))
(defun (first-word s)
(match (string-index char-whitespace? s)
((Some c) (substring/cursors s (string-cursor-start s) c))
((Some c) (substring s (string-cursor-start s) c))
(None s)))
(first-word "hello there world") ;; "hello"