diff options
author | riton <riton@riton.home> | 2025-07-10 12:43:06 +0300 |
---|---|---|
committer | riton <riton@riton.home> | 2025-07-10 12:43:06 +0300 |
commit | 844020c42876479db3b2a881a528ac9b10c7e081 (patch) | |
tree | 948ae9d9bc0a5e178469a7138446483647d595ad /src/util.lisp | |
parent | 64eee7885954e794de60530b140efb152b2a0e8b (diff) |
string-view utility
Diffstat (limited to 'src/util.lisp')
-rw-r--r-- | src/util.lisp | 5 |
1 files changed, 5 insertions, 0 deletions
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 |