[plt-scheme] possibly silly question
(string-append "the quick brown fox" str "lazy" str2)
(and you won't believe it, string-append works for 12,345 strings,
too. I just tried it out:
> Welcome to DrScheme, version 4.2.3.2-svn20nov2009 [3m].
> Language: Module custom; memory limit: 256 megabytes.
> #<world>
> > (define s (apply string-append (build-list 12345 (lambda _ "a"))))
)
On Nov 27, 2009, at 11:14 AM, Charlie Smith wrote:
> string-append's fine if i want to add two stings only, but i'd like
> to add strings inbetween other strings, for example
>
> (define str "jumps over the ")
> (define str2 "dog")
>
> "the quick brown fox" + str + "lazy" + str2
>
>
>
> On Thu, Nov 26, 2009 at 10:42 PM, Robby Findler <robby at eecs.northwestern.edu
> > wrote:
> I believe string-append is exactly what the + is doing below, tho.
> What is different?
>
> Robby
>
> On Thu, Nov 26, 2009 at 6:43 AM, Charlie Smith
> <charliesmith001 at gmail.com> wrote:
> > hi
> >
> > i'd like to know if there is some way of adding strings (sorry, i
> don't what
> > the correct term for this is, maybe variable interpolation?) like
> for
> > example in ruby it would be like
> >
> > str = "sdfdsf"
> > puts "something" + str
> > output: "somethingsdsdf"
> >
> > the function string-append isn't what I want, because i would be
> adding
> > strings somewhat arbitarily in between other strings
> >
> >
> >
> >
> >
> > _________________________________________________
> > For list-related administrative tasks:
> > http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> >
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme