How to truncate string in groovy? I used: def c = truncate("abscd adfa dasfds ghisgirs fsdfgf", 10) but getting error.