Comment detail

LL Golf Hole 2 - 文字列に含まれる単語の最初の文字を大文字にする (Nested Flatten)
短いのは諦めるとしてちょっとひねった方法を思いついたので記念に投稿してみます。
1
2
3
4
5
(defun cap (stream string &rest args)
  (princ (string-capitalize string :end 1) stream))

(format nil "~{~/cap/~^ ~}" (ppcre:split"\\s+" "LL day and night"))
;=> "LL Day And Night"

Index

Feed

Other

Link

Pathtraq

loading...