Difference between revisions of "Template:UcWords"

From Epic Paths
Jump to navigation Jump to search
(Created page with "<includeonly><!-- -->{{#arraymap:{{{1}}}|\s|a|<!-- -->{{#arraymap:a|/|b|<!-- -->{{#arraymap:b|#|c|<!-- -->{{#arraymap:b|:|c|<!-- -->{{ucfirst:c}}<!--...")
 
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-->{{#arraymap:{{{1}}}|\s|a|<!--
-->{{#vardefine:a|{{#arraymap:{{{1}}}|\s|part|{{ucfirst:part}}|\s}}}}<!--
  -->{{#arraymap:a|/|b|<!--
-->{{#vardefine:b|{{#arraymap:{{#var:a}}|/|part|{{ucfirst:part}}|/}}}}<!--
    -->{{#arraymap:b|#|c|<!--
-->{{#vardefine:c|{{#arraymap:{{#var:b}}|#|part|{{ucfirst:part}}|#}}}}<!--
      -->{{#arraymap:b|:|c|<!--
-->{{#vardefine:d|{{#arraymap:{{#var:c}}|:|part|{{ucfirst:part}}|:}}}}<!--
        -->{{ucfirst:c}}<!--
-->{{#var:d}}<!--
      -->|:}}<!--
    -->|#}}<!--
  -->|/}}<!--
-->|\s}}<!--
--></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:  
Example:  


<code><nowiki>{{</nowiki>UcWords:this: should be capitalized}}<noinclude></code>
<code><nowiki>{{</nowiki>UcWords|this:should be capitalized}}<noinclude></code>


Result: {{UcWords:this: should be capitalized}}
Result: {{UcWords|this:should be capitalized}}

Revision as of 08:29, 2 August 2021

Capitalize every word in the text. Considers spaces, /, # and : as seperators.

Example:

{{UcWords|this:should be capitalized}}

Result: This:Should Be Capitalized