By default you can use the methods of the Java String object:
#set( $a = "Hello" )
#set( $b = $a.replace("l", "+") )
${b}
will produce He++o and you can also use velocity variables as arguments to your method calls, e.g.:
#set( $a = "Hello" )
#set( $b = "+" )
#set( $c = $a.replace("l", ${b}) )
${c}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…