String + 1
Posted: Sat Jul 14, 2012 2:16 am
Hi everyone . i need to write a function in lisp that receive string and then add 1 to each characters. for example "2a6c12" and then return "3b7d23".
i write this function
(defun my-list(f)
(loop for x across f collect(code-char(+ 1 (char-code x)))))
but my output like this (#\3 #\b #\7 #\d #\2 #\3) . how can i change this output to normal form ("3b7d23")
tnx a lot
i write this function
(defun my-list(f)
(loop for x across f collect(code-char(+ 1 (char-code x)))))
but my output like this (#\3 #\b #\7 #\d #\2 #\3) . how can i change this output to normal form ("3b7d23")
tnx a lot