You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Robert Lee <Ro...@rcn.com> on 2001/11/07 23:28:52 UTC

String Concatenation

Is there a simple way in Velocity to concatenate strings, the equivalent of
"+" in Java.
i.e.
#set($title = $this + $that + "some more")

Robert Lee
Chief Technology Officer
Fusion Healthcare Solutions
RLee@FusionHealthcare.net
v. 781.863.5276


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: String Concatenation

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 11/7/01 5:35 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> On 11/7/01 5:28 PM, "Robert Lee" <Ro...@rcn.com> wrote:
> 
>> Is there a simple way in Velocity to concatenate strings, the equivalent of
>> "+" in Java.
>> i.e.
>> #set($title = $this + $that + "some more")
> 
> #set( $title = "$this${that}some more" )

In case you are wondering, the ${that} is a 'formal reference' - it's
equivalent to $that, but the curlies make it easier for the parser to know
you mean 

$that + some  

Versus

$thatsome

Where it would try to find 'thatsome' in the context.

Geir

> 
> I promise this goes into to docs tonight!
> 
> 
>> 
>> Robert Lee
>> Chief Technology Officer
>> Fusion Healthcare Solutions
>> RLee@FusionHealthcare.net
>> v. 781.863.5276
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: String Concatenation

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 11/7/01 5:28 PM, "Robert Lee" <Ro...@rcn.com> wrote:

> Is there a simple way in Velocity to concatenate strings, the equivalent of
> "+" in Java.
> i.e.
> #set($title = $this + $that + "some more")

#set( $title = "$this${that}some more" )

I promise this goes into to docs tonight!


> 
> Robert Lee
> Chief Technology Officer
> Fusion Healthcare Solutions
> RLee@FusionHealthcare.net
> v. 781.863.5276
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>