velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Krogh Neigaard <Soren.Krogh.Neiga...@Systematic.com>
Subject RE: indexOf or startsWith in a velocity if statement
Date Wed, 16 Feb 2011 10:04:58 GMT
Oh i can just use Java syntax... Great! Sorry for asking.

Med venlig hilsen / Kind regards

Søren Krogh Neigaard
Systems Engineer

Systematic A/S
Søren Frichs Vej 39
8000 Aarhus C
Denmark

Mobile: +4541965252
Soren.Krogh.Neigaard@Systematic.com

-----Original Message-----
From: Søren Krogh Neigaard [mailto:Soren.Krogh.Neigaard@Systematic.com] 
Sent: 16. februar 2011 11:00
To: user@velocity.apache.org
Subject: indexOf or startsWith in a velocity if statement

Hello

How can I check if a variable starts with a specific word, like in Java indexOf or startsWith?
For eksample:

if($someVar.indexOf("Hello") != -1)

Med venlig hilsen / Kind regards
Søren Krogh Neigaard


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message