Sha256: 9391dc8dd4ab1308f9d26144cdfe126ae9064e169aae433bb0d7b1e1f4171710
Contents?: true
Size: 574 Bytes
Versions: 127
Compression:
Stored size: 574 Bytes
Contents
(in-package #:cl-user) (defpackage #:acronym (:use #:cl) (:export #:acronym)) (in-package #:acronym) (defun acronym (str) (labels ((recur (st ls) (cond ((equal "" st) ls) ((both-case-p (elt st 0)) (recur (string-left-trim "abcdefghijklmnopqrstuvwxyz" (string-left-trim "ABCDEFGHIJKLMNOPQRSTUVWXYZ" st)) (cons (elt st 0) ls))) (t (recur (subseq st 1) ls))))) (map 'string #'char-upcase (nreverse (recur str nil)))))
Version data entries
127 entries across 127 versions & 1 rubygems