Function reference
str: strings
Format numbers, build and search text for labels and tables.
18 names from PineTS 0.11.1 · 9 with full entries
str.tostring
Verifiedstr.tostring(value, format)
Text from a number or bool. format can be format.mintick, format.percent, or a pattern like "#.00".
str.format
Verifiedstr.format(formatString, arg0, arg1, …)
Fills {0}, {1}… in formatString, for example str.format("{0} at {1}", "RSI", r).
str.tonumber
Supportedstr.tonumber(string)
Parses a number; na when it cannot.
str.contains
Supportedstr.contains(source, str)
true when source contains str.
str.length
Supportedstr.length(string)
Number of characters.
str.split
Supportedstr.split(string, separator)
An array of strings.
str.replace_all
Supportedstr.replace_all(source, target, replacement)
Replaces every occurrence.
str.upper
Supportedstr.upper(source) · str.lower(source)
Changes case.
str.format_time
Supportedstr.format_time(time, format, timezone)
Formats a millisecond time, for example "yyyy-MM-dd HH:mm". The feed runs on UTC.
Everything else in str
Also implemented. These follow TradingView’s Pine v6 reference for their arguments.
- str.endswithSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.lowerSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.matchSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.posSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.repeatSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.replaceSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.startswithSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.substringSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
- str.trimSupportedImplemented. Arguments as in TradingView's Pine v6 reference.