Trim string to x characters in Velocity
Hi all
Trying to do something which should be pretty straightforward - struggling! I'm trying to take a 18 character ID and take the first 15 characters from the left.
I've looked up the string documentation and found $String.chop(), but using things like:
#set($id = "001jdhvie9584nvjdk")
#set($id = $id.chop(3))
###or###
#set($id = $String.chop($id, 3)
$id
Gives me simply $id as output. Trying logical methods such as "left" or .get(0,15) doesn't work either.
What am I missing? Thanks!