Last modified: 2007-06-12 19:36:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12231, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10231 - ParserFunction to get a part of a string
ParserFunction to get a part of a string
Status: RESOLVED DUPLICATE of bug 6455
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-12 19:31 UTC by Daniel Tar
Modified: 2007-06-12 19:36 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Tar 2007-06-12 19:31:59 UTC
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.
Comment 1 Raimond Spekking 2007-06-12 19:36:16 UTC

*** This bug has been marked as a duplicate of bug 6455 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links