Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String concat

 
Cindy Martin
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to concate two strings and compare that string to another one..But i could find that in ANT , the concat is only for the files.

For ex,

Str 1 = "abc"
Str 2 = "cdu"

I want to concat these two and compare that resultant string to another string.

Is there any way to do concat for two strings?

Kindly help,

Cindy
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cindy,

Can I ask what String s you are trying to concatenate and what purpose you are using it in the comparison for? I don't _think_ ANT directly supports what you are after but there might be another way around your problem.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cindy,
You don't really have Strings in Ant - you have properties. It is possible to do what you want with two properties. Ant does the implicit concat for string properties.



If you have two actual Strings, they are probably in a scripting language like BSH. If this is the case, you could just use the concat operator in that scripting language.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic