Forum Discussion

ramato's avatar
ramato
New Contributor
14 years ago

[Resolved] Truncating property string

I have a project property that I need to shorten. I am guessing I might do it in a groovy script through some string manipulation.

Project Property
projSerialNumber
123-123-44456
Lets say I wanted to drop the last two digits every time I called this script so the above example would become
123-123-444

What do I need to add?
context.expand( '${#Project#projSerialNumber}' )

note:the digits are random and the last two will not always be 56