From 844020c42876479db3b2a881a528ac9b10c7e081 Mon Sep 17 00:00:00 2001 From: riton Date: Thu, 10 Jul 2025 12:43:06 +0300 Subject: string-view utility --- src/util.lisp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util.lisp') diff --git a/src/util.lisp b/src/util.lisp index d58cde8..cf3bc76 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -8,6 +8,11 @@ `(eval-when (:compile-toplevel :load-toplevel :execute) ,@body))) +(defun make-string-view (source start end) + (make-array (- end start) :element-type 'character + :displaced-to source + :displaced-index-offset start)) + (defun read-file-contents (file-name) (let* ((len 0) (contents -- cgit v1.2.3