Functions
str.length()
Gives the length of a string as an int. One argument, required. The unit the length is counted in is not stated in this edition.
Syntax · 1 of 4
str.length(const string source) → const int
Arguments
source required const string the string to measure Return Type
const int Syntax · 2 of 4
str.length(input string source) → input int
Arguments
source required input string the string to measure Return Type
input int Syntax · 3 of 4
str.length(simple string source) → simple int
Arguments
source required simple string the string to measure Return Type
simple int Syntax · 4 of 4
str.length(series string source) → series int
Arguments
source required series string the string to measure Return Type
series int Example
indicator("String Length Example", overlay=false)
tickerSymbol = syminfo.ticker
tickerLength = str.length(tickerSymbol)
plot(tickerLength, title="Ticker Length", color=color.blue)