[stringtemplate-interest] Truncate string?
Zenaan Harkness
zen at freedbms.net
Tue May 19 22:56:32 PDT 2009
I have such a thing for Java people. If you need it, just email me.
Regards
Zen
On Tue, May 19, 2009 at 10:57:24AM -0700, Terence Parr wrote:
> There is nothing built-in (on purpose), however, you can use a
> formatter for this kind of thing. I believe my paper on
> internationalization or maybe the documentation describes how to do
> this.
> Ter
> On May 19, 2009, at 10:27 AM, Magdalin, Vlad wrote:
>
> > 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
--
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the stringtemplate-interest
mailing list