I want to replace a part of a string in Velocity Template Language with another string.
For Example:
#set($a = "Hello")
#set($b = "+")
I want to replace ll in Hello with ++. The output should be He++o
Please help me
Thanks Kishore
I want to replace a part of a string in Velocity Template Language with another string.
For Example:
#set($a = "Hello")
#set($b = "+")
I want to replace ll in Hello with ++. The output should be He++o
Please help me
Thanks Kishore
By default you can use the methods of the Java String object:
will produce He++o and you can also use velocity variables as arguments to your method calls, e.g.: