Difference between revisions of "Template:UcWords"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
-->{{#vardefine:b|{{#arraymap:{{#var:a}}|/|part|{{ucfirst:part}}|/}}}}<!-- | -->{{#vardefine:b|{{#arraymap:{{#var:a}}|/|part|{{ucfirst:part}}|/}}}}<!-- | ||
-->{{#vardefine:c|{{#arraymap:{{#var:b}}|#|part|{{ucfirst:part}}|#}}}}<!-- | -->{{#vardefine:c|{{#arraymap:{{#var:b}}|#|part|{{ucfirst:part}}|#}}}}<!-- | ||
-->{{#vardefine:d|{{#arraymap:{{#var:c}}|:|part|{{ucfirst:part}}|:}}}}<!-- | |||
-->{{#var:d}}<!-- | -->{{#var:d}}<!-- | ||
--></includeonly><noinclude>Capitalize every word in the text. Considers spaces, /, # and : as seperators. | --></includeonly><noinclude>Capitalize every word in the text. Considers spaces, /, # and : as seperators. | ||
Example: <nowiki>{{UcWords|main sub ter}}</nowiki> = {{UcWords|main sub ter}} | Example: <nowiki>{{UcWords|main sub ter}}</nowiki> = {{UcWords|main sub ter}} | ||
Line 15: | Line 13: | ||
Example: <nowiki>{{UcWords|main#sub ter}}</nowiki> = {{UcWords|main#sub ter}} | Example: <nowiki>{{UcWords|main#sub ter}}</nowiki> = {{UcWords|main#sub ter}} | ||
Example: <nowiki>{{UcWords|main: sub}}</nowiki> = {{UcWords|main: sub}} | '''(Note)''' Example: <nowiki>{{UcWords|main: sub}}</nowiki> = {{UcWords|main: sub}} | ||
Example: <nowiki>{{UcWords|: | '''(Note)''' Example: <nowiki>{{UcWords|:Category:Combat}}</nowiki> = {{UcWords|:Category:Combat}} | ||
Usage: | Usage: | ||
<code><nowiki>{{</nowiki>UcWords|this:should be capitalized}}<noinclude></code> | <code><nowiki>{{</nowiki>UcWords|this:should be capitalized}}<noinclude></code> |
Latest revision as of 15:58, 6 August 2021
Capitalize every word in the text. Considers spaces, /, # and : as seperators.
Example: {{UcWords|main sub ter}} = Main Sub Ter
Example: {{UcWords|main/sub ter}} = Main/Sub Ter
Example: {{UcWords|main#sub ter}} = Main#Sub Ter
(Note) Example: {{UcWords|main: sub}} = Main:Sub
(Note) Example: {{UcWords|:Category:Combat}} = Category:Combat
Usage:
{{UcWords|this:should be capitalized}}