Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 611 Bytes

File metadata and controls

34 lines (25 loc) · 611 Bytes

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

echo '"Zed"' | zq -z 'yield upper(this)' -

=>

"ZED"

Slices can be used to uppercase a subset of a string as well.

echo '"zed"' | zq -z 'func upper_first_char(str): (upper(str[0:1]) + str[1:]) yield upper_first_char(this)' -

=>

"Zed"