Returns a string with every letter converted to lower case.
str.lower changes upper-case letters to lower case and leaves digits, symbols and spaces alone.
Normalise case before comparing text, because str.contains and the other string tests are case-sensitive.
Syntax
str.lower(source: const string) -> const string
str.lower(source: simple string) -> simple string
str.lower(source: series string) -> series stringArguments
| Name | Type | Default | Description |
|---|---|---|---|
| source | const/ | required | The text to turn into lower case. Characters without a case stay as they are. |
Returns
const/simple/series string: the lower-case text.
Remarks
- Use
str.upperfor the opposite change.
Example
//@version=6
indicator("Lower")
same = str.lower(syminfo.ticker) == "nvda"
plot(same ? 1 : 0, "Is NVDA", color = color.green, style = plot.style_stepline)See also
Runs on Sidechair