Difference between revisions of "Template:Capitalize"

From Wikispooks
Jump to navigation Jump to search
(test)
 
(Remove #:substring)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>'''This template capitalizes its argument'''.<br/>
+
<noinclude>[[category:String manipulation templates‎]]'''This template capitalizes the first letter of its argument'''.<br/>
 +
For the reverse operation, see [[template:Uncapitalize]].<br/>
 
Currently, only unaccented English characters (a-z) are supported.<br/>
 
Currently, only unaccented English characters (a-z) are supported.<br/>
</noinclude><includeonly>{{#switch: {{#substring:{{{1}}}|0|1}}
+
</noinclude><includeonly>{{#switch: {{#sub:{{{1}}}|0|1}}
 
  | a = A
 
  | a = A
 
  | b = B
 
  | b = B
Line 28: Line 29:
 
  | y = Y
 
  | y = Y
 
  | z = Z
 
  | z = Z
  | #default = {{#substring:{{{1}}}|0|1}}
+
  | #default = {{#sub:{{{1}}}|0|1}}
}}{{#substring:{{{1}}}|1|}}</includeonly>
+
}}{{#sub:{{{1}}}|1|}}</includeonly>

Latest revision as of 06:02, 6 July 2019

This template capitalizes the first letter of its argument.
For the reverse operation, see template:Uncapitalize.
Currently, only unaccented English characters (a-z) are supported.