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; - The parameter defines the number of replacements.
count:-1; (default) - replace all
count:n; - n - number of replacement occurrence
start:n; - The parameter defines 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.
Dim sString
sString = Pm.StringReplace("XXpXXPXXp", "p", "Y") ' Returns "XXYXXPXXY"
PROMOTIC 8.3.21 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