str.tostring() - Pine Script Function
str.tostring()
Section titled “str.tostring()”Overview
Section titled “Overview”value (simple int/float) Value or array ID whose elements are converted to a string.
Syntax
Section titled “Syntax”str.tostring(value, format) → simple stringParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| value | simple int/float | Value or array ID whose elements are converted to a string. |
Returns
Section titled “Returns”The string representation of the value argument.
Remarks
Section titled “Remarks”- The formatting of float values will also round those values when necessary, e.g. str.tostring(3.99, ’#’) will return “4”.