ReplaceA
PowerScript function
Description
Temporarily converts a string to DBCS based on the current locale,
then replaces a portion of one string with another.
Syntax
|
1 |
ReplaceA (string1, start, n, string2) |
|
Argument |
Description |
|---|---|
|
string1 |
The string containing characters you want to |
|
start |
A long whose value is the position in bytes of the first |
|
n |
A long whose value is the number of bytes you want to |
|
string2 |
The string that will replace characters in string1. The |
Return value
String. Returns the string with the characters replaced if it
succeeds and the empty string if it fails. If any argument’s value is
null, ReplaceA returns null.
Usage
ReplaceA replaces the functionality that Replace had in DBCS
environments in PowerBuilder 9. ReplaceA replaces a string by number of
bytes, whereas Replace replaces a string by number of characters in both
SBCS and DBCS environments. ReplaceA also specifies the starting position
of the string to be replaced by number of bytes, whereas Replace specifies
the starting position by number of characters.
In SBCS environments, Replace, ReplaceW, and ReplaceA return the
same results.