[stringtemplate-interest] Truncate string?

Magdalin, Vlad Vladimir_Magdalin at intuit.com
Tue May 19 10:27:36 PDT 2009


Hi all,

 

Does StringTemplate have a way to truncate strings to a certain amount
of characters? For example, in NVelocity, I can do something like this:

 

$formatter.LimitLen(100, $longText, "...")

 

If 'longText' is longer than 100, only the first 100 will be rendered,
and the ellipsis is added at the end.

 

Anything similar available in StringTemplate?

 

Thanks,

Vlad

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20090519/13eb12c6/attachment.html 


More information about the stringtemplate-interest mailing list