Promotic
WikipediaLinkedInYoutubeTwitterFacebook

StringReplace - method of object Pm

Description:
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.
Syntax:
StringReplace(sValue As String, sSearch As String, sReplace As String, [sParams As String]) As String
Calling:
sReplaced = Pm.StringReplace(sValue, sSearch, sReplace[, sParams])
Parameters:
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)
Note:
The method can also be called in the graphic item events for Web Panels.
Example:
Dim sString
sString = Pm.StringReplace("XXpXXPXXp", "p", "Y") ' Returns "XXYXXPXXY"
Navigation:
 
- 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