StringReplace - method of object Pm

The method searches for each occurrence of the sSearch text in the sValue string, replaces the sSearch text by the sReplace value and returns the result.
StringReplace(sValue As String, sSearch As String, sReplace As String, [sParams As String]) As String
sReplaced = Pm.StringReplace(sValue, sSearch, sReplace[, sParams])
sValue(String) Source string in which possibly found sSearch value will be replaced by the sReplace value.
sSearch(String) Text in the sValue string that has to be replaced by the sReplace value.
sReplace(String) Value by which the sSearch item in the sValue string has to be replaced.
sParams[optional] (String)
count:n; - Specifies the number of replacements.
count:-1; (default) - replace all
count:n; - n - number of replacement occurrence
start:n; - Specifies the starting position of replacement.
start:0; (default) - the replacemenet start is from the beginning of the source text
start:n; - n - Character position in the source string defining the start of the replacemenet (zero-based index)
The method can also be called in the graphic item events for Web panels.
JavaScriptVBScriptSelect and copy to clipboard

var sString = Pm.StringReplace("XXpXXPXXp", "p", "Y");  //sString contains "XXYXXPXXY"
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- StringReplace
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice