Capitalize
Returns a copy with the first character uppercased and the rest lowercased.
Module: Std
Signature
rux
func Capitalize(self) -> String;Returns
String — a new string whose first character is uppercased and whose remaining ASCII letters are lowercased.
Description
Affects ASCII letters only; other bytes are copied unchanged. An empty string returns an empty string. The receiver is left untouched — see CapitalizeInPlace for the in-place variant.
See also
String— the string typeTitleCase— capitalize every wordCapitalizeInPlace— the in-place variant