Skip to content
TradequixDocsOpen the terminal
OverviewStart here, search, progress
  • Introduction
  • Quickstart
  • How a script runs
  • Types and qualifiers
  • Operators, conditionals and loops
  • Functions and methods
  • Objects and enums
  • Arrays, matrices and maps
  • Strings and colours
  • Time and sessions
  • Bar states
  • Plotting
  • Inputs
  • Technical analysis
  • Drawings and tables
  • Multiple timeframes
  • Strategies
  • Alerts in scripts
  • Repainting
  • The Pine editor
  • Indicator settings
  • Coming from TradingView
  • The data
  • Publish and sell
  • Catalogue and community
  • Your dashboard and earnings
  • Errors and debugging
  • Limits
  • Coverage
  • Built-in catalogue
  • Cookbook
  • Write Pine with AI
  • FAQ
  • Glossary
  • Cheat sheet
  • Function reference
  • Will it run here?
  • Error index
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

Verified
str.tostring(value, format)

Text from a number or bool. format can be format.mintick, format.percent, or a pattern like "#.00".

str.format

Verified
str.format(formatString, arg0, arg1, …)

Fills {0}, {1}… in formatString, for example str.format("{0} at {1}", "RSI", r).

str.tonumber

Supported
str.tonumber(string)

Parses a number; na when it cannot.

str.contains

Supported
str.contains(source, str)

true when source contains str.

str.length

Supported
str.length(string)

Number of characters.

str.split

Supported
str.split(string, separator)

An array of strings.

str.replace_all

Supported
str.replace_all(source, target, replacement)

Replaces every occurrence.

str.upper

Supported
str.upper(source)  ·  str.lower(source)

Changes case.

str.format_time

Supported
str.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.

On this page

  • str.tostring
  • str.format
  • str.tonumber
  • str.contains
  • str.length
  • str.split
  • str.replace_all
  • str.upper
  • str.format_time
  • Everything else (9)