summaryrefslogtreecommitdiff
path: root/utils.lisp
blob: d0dfbd074956a60ee9b9e8760f1b6e39fbea11f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
(in-package :granolin )

(defun string->json-key (s)
  (read-from-string (format nil ":|~a|" s)))

(defun readable-username (s)
  (let ((stop-index (search ":" s)))
    (if (and stop-index
             (equal #\@ (aref s 0)))
        (subseq s 1 stop-index)
        s)))