Documentation: Difference between revisions

→‎{{header|Wren}}: Changed method name for consistency with 'Fmt' module.
(Added Wren)
(→‎{{header|Wren}}: Changed method name for consistency with 'Fmt' module.)
Line 1,839:
 
// capitalizes the first letter of an ASCII string
static toTitlecapitalize(s) {
var firstByte = s[0].bytes[0]
if (firstByte >= 97 && firstByte <= 122) {
Line 1,851:
// test code
var smol = "meaning of life"
System.print("'%(smol)' + 123 = %(add.call(mol, 123))")
System.print("'%(smol)' reversed = %(StrUtil.reverse(smol))")
System.print("'%(smol)' titled capitalized = %(StrUtil.toTitlecapitalize(smol))")</lang>
 
{{out}}
<pre>
'meaning of life' + 123 = 165
'meaning of life' reversed = efil fo gninaem
'meaning of life' titled capitalized = Meaning of life
</pre>
 
 
=={{header|ZX Spectrum Basic}}==
9,490

edits