Extension talk:StringFunctionsEscaped/Archive

Hi,

How would I use this extension to make a general purpose 'white-space trimming' template? I often find that my layout of code in templates, which is optimized for readability, is substandard when it comes to layout, typically introducing too much white-space at the point where the template is called.

I'd like to write two 'wrapper' templates that would call templates but strip white-space:
 * 1) before and after the textual return value of the template, and
 * 2) everywhere within the textual return of the template.

For example, the latter template would be useful when the called template isn't designed to generate any output, but rather perform some calculation or another. In that case, the template should be 'invisible' to the calling page. As it is I often find a) problems with white-space, or b) template code that is hard to read and lacks in-line documentation.

Where I'd normally be saying, I'd like to say:


 * , or

Or something like that. Can I build those templates with this extension?

Cheers, --Dmb 14:10, 4 June 2010 (UTC)