User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

harlowe:upperfirst [2017/10/09 20:39] (current)
Line 1: Line 1:
 +**(upperfirst:​ // [[harlowe:​String|String]]//​) -> //​String//​**
 +This macro produces a version of the given [[harlowe:​string|string]],​ where the first alphanumeric character is uppercase, and
 +other characters are left as-is.
 +=== Example usage: ===
 +''​%%(upperfirst:​ " ​ college B"​)%%''​ is the same as ''​%%" ​ College B"​%%''​
 +=== Details: ===
 +If the first alphanumeric character cannot change case (for instance, if it's a [[harlowe:​number|number]]) then nothing
 +will change in the string. So, "​4ever"​ won't become "​4Ever"​.
 +The results of this macro for non-ASCII characters currently depends on the player'​s browser'​s Unicode
 +support. For instance, '​ß'​ in uppercase should be '​SS',​ but some browsers don't support this.
 +=== See also: ===
 +[[harlowe:​uppercase|(uppercase:​)]],​ [[harlowe:​lowercase|(lowercase:​)]],​ [[harlowe:​lowerfirst|(lowerfirst:​)]]
harlowe/upperfirst.txt · Last modified: 2017/10/09 20:39 (external edit)