How to truncate a string in groovy?

Viewed 50453

How to truncate string in groovy?

I used:

def c = truncate("abscd adfa dasfds ghisgirs fsdfgf", 10)

but getting error.

5 Answers
Related