(defstruct msg-info sender reciver message) ;; nice recursive string-splitting function... (defun string-split (x &optional (deliniator #\space)) (let ( (x (string-left-trim " " x)) (n 0) ) (loop until (or (>= n (length x)) (char= (char x n) deliniator)) do (incf n)) (if (string= x "") nil (cons (subseq x 0 n) (string-split (subseq x n)))))) ;; the opposite :) (defun string-join (x &optional (inbetween "")) (when x (concatenate 'string (car x) (if (cdr x) inbetween "") (string-join (cdr x) inbetween)))) (defun cut-from-list (thelist pos) (concatenate 'list (subseq thelist 0 pos) (subseq thelist (+ 1 pos))))