How can I capitalize the first letter in a string using mediawiki?
Asked Answered
B

1

6

How can I capitalize the first letter of a string (or of each word) in Mediawiki? In this case, the string is just a single word, so capitalizing every word's first letter is ok as well.

I want to do something like

{{#capitalize:string}}

and get output

String

I already tried with

{{#titleparts:mystring}}

but it doesn't alter my string at all (tried at http://sv.wiktionary.org)

Buhrstone answered 7/2, 2017 at 16:47 Comment(0)
P
6

It's {{ucfirst:string}}. See https://www.mediawiki.org/wiki/Help:Magic_words for information on all built-in parser functions.

Patriapatriarch answered 7/2, 2017 at 19:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.