Tmplz Template API

Tmplz Tags

Extra Tags: Trim

The Trim tag is used to remove extra spaces and line breaks. For example, this:

  [$Trim]
  1
  2
  3
  [$Trim]

- will be parsed into this:

  1 2 3

Note that there is a single space between each of the numbers above, so the whitespace is not completely removed; rather, it is reduced to a single space character. Usually this yields the most desirable results.

Placement

The Trim tag can be used as a top level tag, within any Section, and within any Fillin. It can also be used more than once within any of these contexts.

Auto-Trim

By default Tmplz trims extra space from tags that appear on lines by themselves. This can be turned off by a programmer using the TemplateManager.setAutoTrim() API call.

Next page: AttrSection