Last modified: 2008-11-13 23:10:45 UTC
Created attachment 5524 [details] an extra parser function In some templates, it is useful to be able to do some basic reading of the string. For example, the cite book template needs to be able to read at least the last letter of the strings it is passed, so that it can fix output by not putting a period after a period-ended string (this does appear on several real-world wiki articles), and the 'best practices' solution is to keep the period with the citation to be semantically correct, and fix this in the formatting stages in the template. Now, if there is a way to do this, I have not yet found it (nor have the cite book authors), so my patch may be the wrong way/place to do this, but it is a simple, harmless, generic function that can be trivially wrapped in a template to do odd little useful things like in the cite book example.
Already in the StringFunctions extension, see bug 16197.
Ah, sorry. That (for some reason) is not on Wikipedia, which is probably why I had not found it when searching for this. Thanks.