On 23 Oct 2009, at 08:45, Rajesh Saha wrote: > Hi All, > > How can I get the string length in PTT ? > > For example, the string length of "boy" is 3, the string length of > "girl" is 4 & the string length of "Good boy" is 8.
Its a scalar vmethod - length See http://www.template-toolkit.org/docs/manual/VMethods.html#section_Scalar_Virtual_Methods [% SET mystring = "Good boy"; "The length of \'"; mystring; "\' is "; mystring.length; %] Nigel. -- [ Nigel Metheringham [email protected] ] [ - Comments in this message are my own and not ITO opinion/policy - ] _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
