summaryrefslogtreecommitdiff
path: root/str.lisp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2026-05-01 14:16:07 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2026-05-01 14:16:07 -0300
commita4411bcc3919c2099934fd49664ee689460ebf80 (patch)
tree524492a5febcd921528da7634ff91068b8c63d02 /str.lisp
parentd1816df4c029447f94963355cbdce5c434063ee6 (diff)
downloadutils-a4411bcc3919c2099934fd49664ee689460ebf80.tar.gz
utils-a4411bcc3919c2099934fd49664ee689460ebf80.zip
Update librariesHEADmain
Diffstat (limited to 'str.lisp')
-rw-r--r--str.lisp20
1 files changed, 0 insertions, 20 deletions
diff --git a/str.lisp b/str.lisp
index 3d88d11..c0caeb4 100644
--- a/str.lisp
+++ b/str.lisp
@@ -52,23 +52,3 @@
(format result "~a" (char-downcase (char str i)))
(format result "~a" (char str i))))
(get-output-stream-string result)))
-
-(defun line-and-column (str index)
- (let ((line 1) (column 1))
- (dotimes (i index)
- (let ((c (char str i)))
- (case c
- (#\Newline
- (incf line)
- (setf column 1))
- (t (incf column)))))
- (cons line column)))
-
-(defun context-window (str index &key (side-length 20))
- (let ((begin (max (- index side-length) 0))
- (end (min (+ index side-length) (length str)))
- (result '()))
- (push (subseq str begin index) result)
- (push (elt str index) result)
- (push (subseq str (1+ index) end) result)
- result))