Replaces the specified substring with a new string.
Deprecated: This command is not recommended for use in new scripts. Use the StrReplace function instead.
StringReplace, OutputVar, InputVar, SearchText , ReplaceText, ReplaceAll
If blank or omitted, only the first occurrence of SearchText will be replaced. Otherwise, specify 1, A, or All to replace all occurrences.
Specify the word UseErrorLevel to store in ErrorLevel the number of occurrences replaced (0 if none). UseErrorLevel implies "All".
When the last parameter is UseErrorLevel, ErrorLevel is given the number occurrences replaced (0 if none). Otherwise, ErrorLevel is set to 1 if SearchText is not found within InputVar, or 0 if it is found.
For this and all other commands, OutputVar is allowed to be the same variable as InputVar.
The built-in variables A_Space and A_Tab contain a single space and a single tab character, respectively. They are useful when searching for spaces and tabs alone or at the beginning or end of SearchText.
[v1.0.45+]: The AllSlow option became obsolete due to improvements to performance and memory utilization. Although it may still be specified, it has no effect.
StrReplace(), RegExReplace(), IfInString, StringCaseSense, StringLeft, StringRight, StringMid, StringTrimLeft, StringTrimRight, StringLen, StringLower, StringUpper, StringGetPos, If Var is [not] Type