{{temp|str right}}

Fragment of a discussion from User talk:Catsidhe
Jump to navigation Jump to search

I take it back. The string extensions are not enabled on Wiktionary.

From a quick look what it requires for them to be enabled is

Add to the bottom of LocalSettings.php:
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
If you want to use the integrated string function functionality, add just after that line
$wgPFEnableStringFunctions = true;

which is something the Site admins have to do.

Once that's done, taking the final character of a string is a native expression (not a template function), and as simple as {{#pos:string|-1}}, which currently is invalid, but if/when the string extensions are enabled, will return "g". (And {{#pos:string|-2}} returns "ng", etc.

With String Extensions enabled, a lot of things which are currently difficult, impossible, or so expensive as to be dangerous, become trivial.

Catsidhe (talk)01:16, 14 January 2013

Why in hell do we not have this enabled???? I thought the devs were opposed to it or something, but it seems like it'd be ridiculous to keep going on without string manipulation and hoping that Scribunto will be deployed (will that even happen this year?).

Μετάknowledgediscuss/deeds01:57, 14 January 2013

To the Batmobile Grease Pit!

- -sche (discuss)02:21, 14 January 2013

Well, for now, I've made {{dsb-decl-noun-2}} such that the user simply has to specify whether the stem ends in d/t or zd/st. Ain't nobody got time for that!

Angr20:46, 14 January 2013