Difference between revisions of "Template:Capitalize"

From Wikispooks
Jump to navigation Jump to search
m (Text replacement - "String Templates" to "String manipulation templates")
(Remove #:substring)
 
Line 2: Line 2:
 
For the reverse operation, see [[template:Uncapitalize]].<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 29: 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.