ReplaceA DataWindow expression function
Description
Replaces a portion of one string with another.
Syntax
1 |
<span>ReplaceA</span> ( <span>string1</span>, <span>start</span>, <span>n</span>, <span>string2</span> ) |
Argument |
Description |
---|---|
string1 |
The string in which you want to replace |
start |
A long whose value is the number of the |
n |
A long whose value is the number of bytes |
string2 |
The string that replaces bytes in string1. |
Return Values
String. Returns the string with the bytes replaced if it succeeds
and the empty string (“”) if it fails.
Usage
If the start position is beyond the end of the string, ReplaceA appends string2 to string1.
If there are fewer bytes after the start position than specified
in n, ReplaceA replaces
all the bytes to the right of character start.
If n is zero, then in effect ReplaceA inserts string2 into string1.
ReplaceA replaces the functionality that Replace had
in DBCS environments in PowerBuilder 9. In SBCS environments, Replace and ReplaceA return
the same results.
See Also
-
ReplaceA in the PowerScript
Reference