Advertisement
Isoraqathedh

split-string

Aug 4th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.38 KB | None | 0 0
  1. CL-USER> (loop with input-string = "abNandrRpQ"
  2.                with current-string = ()
  3.                for i across input-string
  4.                do (push i current-string)
  5.                when (upper-case-p i)
  6.                  collect (coerce (reverse current-string) 'string)
  7.                  and do (setf current-string ()))
  8.                  
  9.                
  10. ("abN" "andrR" "pQ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement