Documentation Index
Fetch the complete documentation index at: https://docs.darvas.app/llms.txt
Use this file to discover all available pages before exploring further.
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
| Function | Returns | Description |
|---|---|---|
str.format(template, ...args) | string | Printf-style formatting |
str.length(s) | number | Character count |
str.substring(s, start, len) | string | Extract a portion |
str.contains(s, substring) | boolean | Substring presence check |
str.split(s, sep) | string[] | Split into array |
str.upper(s) | string | Convert to upper case |
str.lower(s) | string | Convert to lower case |
str.trim(s) | string | Remove leading/trailing whitespace |
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.