Content deleted Content added
m →lower: fixed typo |
tidy doc for sentence function |
||
Line 1:
{{module rating|release}}
The module '''String2''' contains five
== Functions ==
Line 13:
=== sentence ===
The sentence function finds the first letter and capitalises it, then renders the rest of the text in lower case. It works properly with text containing wiki-markup. Compare <code><nowiki>{{#invoke:String2|sentence|[[action game]]}}</nowiki></code> -> {{#invoke:String2|sentence|[[action game]]}} with <code><nowiki>{{ucfirst:{{lc:[[action game]]}}}}</nowiki></code> -> {{ucfirst:{{lc:[[action game]]}}}}. Piped wiki-links are handled as well:
* <code><nowiki>{{#invoke:String2|sentence|[[trimix (breathing gas)|trimix]]}}</nowiki></code> -> {{#invoke:String2|sentence|[[trimix (breathing gas)|trimix]]}} So are lists: * <code><nowiki>{{#invoke:String2 |sentence |{{hlist ||[[apples]] |[[pears]] |[[oranges]]}}}}</nowiki></code> → {{#invoke:String2 |sentence |{{hlist |[[apples]] |[[pears]] |[[oranges]]}}}}
=== ucfirst ===
|