Page MenuHomePhabricator

ParserFunction to get a part of a string
Closed, DuplicatePublic

Description

Author: bdanee88

Description:
A ParserFunction, what return the defined part of the given string would be great.

What I mean? In pascal the copy('text', 1, 1) function gives back the 't' text. It exists in other programming languages, too, but not in ParserFunctions, in MW.

There would be a parserfunction, what do this, for example:

{{#STRPART:{{{param}}}|1|1}}

and it would return the first character of the param parameter.

This function would be very useful, but mostly in languages like Hungarian, because if the first character is vowel, the text before the noun is 'az', but if the first character is consonant, the 'a' is used (like a/an in english). In cases we don't know the type of starting character, we must use a(z) /in Hungarian/, a(n) /in English/, what is ugly.

In addition this function would be used for other useful things.


Version: unspecified
Severity: enhancement

Details

Reference
bz10231

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport set Reference to bz10231.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 6455 ***