From 16278c2c929ef142632ac339c8fc505460405bd055bf855eee7926f622937733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Bj=C3=B6rnstam?= Date: Mon, 5 Oct 2026 09:02:15 +0200 Subject: [PATCH] substring, after Bjolang's rename of substring/cursors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [ECA](https://eca.dev) Co-Authored-By: eca-agent --- _01.Language-basics.sz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_01.Language-basics.sz b/_01.Language-basics.sz index 52df1f3..1947a13 100644 --- a/_01.Language-basics.sz +++ b/_01.Language-basics.sz @@ -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"