upper
Function
upper — convert a string to upper case
Synopsis
upper(s: string) -> string
Description
The upper function converts all lower case Unicode characters in s
to upper case and returns the result.
Examples
yield upper(this)
"Super format"
Loading...
echo '"Super format"' \
| super -z -c 'yield upper(this)' -
Slices can be used to uppercase a subset of a string as well.
func capitalize(str): (
upper(str[1:2]) + str[2:]
)
yield capitalize(this)
"super format"
Loading...
echo '"super format"' \
| super -z -c 'func capitalize(str): (
upper(str[1:2]) + str[2:]
)
yield capitalize(this)' -