Overview
Thestr namespace provides a set of string helpers. All functions are pure (no side effects) and available globally as str.*. Use them primarily for console.log formatting or building label text for Label entities.
Function reference
str.format - placeholder syntax
str.format uses {} placeholders, filled left-to-right from the remaining arguments:
Practical example
Splitting instrument IDs
Case conversion
For the full list of available
str.* functions, see the custom indicator spec. The table above covers the most commonly used subset.Related pages
math.*
Numeric utilities - use with str.format for formatted labels.
Label entity
Display formatted text on the chart canvas.