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.
str.length(const string source) → const intstr.length(input string source) → input intstr.length(series string source) → series intstr.length(simple string source) → simple int| Parameter | Type | Required | Description |
|---|---|---|---|
source | const string | yes | the string to measure |
Returns const int or input int or series int or simple int — An int in the form of the argument you pass.
indicator("Length of the ticker")
plot(str.length(syminfo.ticker))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.