diff options
author | Boutade <thegoofist@protonmail.com> | 2019-09-28 22:45:43 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-09-28 22:45:43 -0500 |
commit | f50e97a59ea992e5475449763177690b4005506b (patch) | |
tree | 782f22e275d7c05bc43ab6bdd977322f50310d6c /utils.lisp | |
parent | c34fc605de6bd9e41cf4ca964c9a9ae431e5ebf3 (diff) |
added readable-username function
Diffstat (limited to 'utils.lisp')
-rw-r--r-- | utils.lisp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2,3 +2,10 @@ (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))) |