Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

ReplaceA – PB Docs 2019 – PowerBuilder Library

ReplaceA – PB Docs 2019

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

Argument

Description

string1

The string containing characters you want to
replace.

start

A long whose value is the position in bytes of the first
character you want to replace in string1.

n

A long whose value is the number of bytes you want to
replace in string1.

string2

The string that will replace characters in string1. The
number of characters in string2 can be greater than, equal to,
or less than the number of characters you are replacing.

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.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x