summaryrefslogtreecommitdiff
path: root/str.lisp
diff options
context:
space:
mode:
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))