Subject: Re: How to concatenate with a String with fill-pointer
From: Erik Naggum <>
Date: 05 Dec 2000 01:45:21 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Nils Goesche <>
| Isn't there some kind of a built-in (and hopefully faster) function to
| replace nstrcat?  Note that something like (concatenate (type-of str1)
| str1 str2) doesn't work (at least not in CMUCL), because the resulting
| string doesn't have a fill pointer anymore; also, I am not sure
| whether this operation would be destructive, anyway :-)
| Any ideas?

  Move the fill-pointer and perhaps extend the array far enough that you
  have room for the new string, and then use (setf (subseq ...) ...) to
  store into the string.  This modifies the target string, of course.

  "When you are having a bad day and it seems like everybody is trying
   to piss you off, remember that it takes 42 muscles to produce a
   frown, but only 4 muscles to work the trigger of a good sniper rifle."
								-- Unknown