Functions
str.replace()
Substitutes one piece of text for another inside a string. The source, the old text and the new text are required; the count is optional.
Syntax · 1 of 4
str.replace(const string source, const string old, const string new, const int count) → const string
Arguments
source required const string the string to work on old required const string the text to replace new required const string the text to put in its place count const int optional; how many occurrences to replace Return Type
const string Syntax · 2 of 4
str.replace(input string source, input string old, input string new, input int count) → input string
Arguments
source required input string the string to work on old required input string the text to replace new required input string the text to put in its place count input int optional; how many occurrences to replace Return Type
input string Syntax · 3 of 4
str.replace(simple string source, simple string old, simple string new, simple int count) → simple string
Arguments
source required simple string the string to work on old required simple string the text to replace new required simple string the text to put in its place count simple int optional; how many occurrences to replace Return Type
simple string Syntax · 4 of 4
str.replace(series string source, series string old, series string new, series int count) → series string
Arguments
source required series string the string to work on old required series string the text to replace new required series string the text to put in its place count series int optional; how many occurrences to replace Return Type
series string Example
indicator(str.replace("GoCharting is great!", "great", "awesome"), overlay=false)
plot(close)