str.upper

Converts a string to upper case; the other half of the pair with str.lower. It takes the string and nothing else.

str.upper(const string source) → const string
str.upper(input string source) → input string
str.upper(series string source) → series string
str.upper(simple string source) → simple string
ParameterTypeRequiredDescription
sourceconst stringyesthe string to convert

Returns const string or input string or series string or simple string — A string in the form of the argument you pass.

indicator("Ticker in upper case")
alert(str.upper(syminfo.ticker))
plot(close)

See also str.contains · str.endswith · str.format_time

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade