RosettaCodeData/Task/String-length/Emacs-Lisp/string-length-3.l
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

7 lines
269 B
Common Lisp

(let ((str (apply 'string
(mapcar (lambda (c) (decode-char 'ucs c))
'(#x1112 #x1161 #x11ab #x1100 #x1173 #x11af)))))
(list (length str)
(string-bytes str)
(string-width str)))
=> (6 18 4) ;; in emacs 23 up