[]
This function replaces part of a text string with a different text string (based on specified number of bytes).
REPLACEB(old_text, start_char, num_bytes, new_text)
This function has the following arguments:
Argument | Description |
|---|---|
old_text | [Required] Refers to the original text in which you want to replace characters. |
start_char | [Required] Refers to the starting position in the original text to begin the replacement. |
num_bytes | [Required] Refers to the number of bytes in the original text that you want to replace with characters from the new text. If this function is not an integer, the number is truncated. |
new_text | [Required] Refers to the new text that replaces characters in the original text. |
The REPLACEB function counts 2 bytes per character, but this happens only when a DBCS language is set as the default language.
REPLACEB("lovely",1,3,"lo") gives the result loely.
REPLACEB("rosy",1,3,"!") gives the result !y.