Remove first and last characters from a string in Lisp

Posted by powerj1984 on Stack Overflow See other posts from Stack Overflow or by powerj1984
Published on 2010-05-30T20:54:35Z Indexed on 2010/05/30 21:02 UTC
Read the original article Hit count: 280

I am passing in command line arguments to my Lisp program and they are formatted like this when they hit my main function: ("1 1 1" "dot" "2 2 2")

I have a dot function and would like to call it directly from the argument, but first I must strip the " characters.

I tried variations of this function:
(defun remove-quotes (s)
(setf (aref s 0) '""))

to no avail, Lisp complains that "" is not a member of base-char.

Thanks!

© Stack Overflow or respective owner

Related posts about string-manipulation

Related posts about lisp