title: How to call functions within a XTemplate (itemTpl)
body: <p>I would like to use Ext's <a href="http://docs.sencha.com/touch/2-0/#!/api/Ext.String" rel="noreferrer">String</a> method on some text that will be output to the view.</p>
  
  <p>For example:</p>
  
  <pre><code>itemTpl: [
      ...
      '&lt;tpl switch="post_type"&gt;',
      '&lt;tpl case="new_user"&gt;',
          '&lt;p&gt;{post_text_teaser}&lt;/p&gt;',
          '&lt;p&gt;{timestamp}&lt;/p&gt;',
      '&lt;tpl default&gt;',
          '&lt;p&gt;' + Ext.String.ellipsis( + '{post_text_teaser}' + \, 4) + '&lt;/p&gt;',
      ...
  ].join(''),
  </code></pre>
  
  <p>but of course the concatenation in line 10 is illegal.</p>
  
  <p>Do you know if it's possible or how to do this correctly?</p>