Articles with the tag:
Close
Changelog
Close
Articles with the tag:
Close
Try in the cloud
Try in the cloud

REPLACE/REPLACEB Function

The REPLACE/REPLACEB function is one of the text and data functions. Is used to replace a set of characters, based on the number of characters and the start position you specify, with a new set of characters. The REPLACE function is intended for languages that use the single-byte character set (SBCS), while REPLACEB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

Syntax

REPLACE(old_text, start_num, num_chars, new_text)

The REPLACE function has the following arguments:

Argument Description
old_text The original text to be replaced.
start_num The beginning of the set to be replaced.
num_chars The number of characters to be replaced.
new_text The new text.

REPLACEB(old_text, start_num, num_bytes, new_text)

The REPLACEB function has the following arguments:

Argument Description
old_text The original text to be replaced.
start_num The beginning of the set to be replaced.
num_bytes The number of characters to be replaced, based on bytes.
new_text The new text.

Notes

The REPLACE function is case-sensitive.

How to apply the REPLACE/REPLACEB function.

Examples

The figure below displays the result returned by the REPLACE function.

REPLACE Function

Return to previous page
Try now for free Try and make your decision No need to install anything
to see all the features in action