Replace Substring Function
- Updated2026-06-02
- 2 minute(s) read
Inserts, deletes, or replaces a substring at the offset you specify in string.

Inputs/Outputs
string
—
string is the string in which you want to replace bytes.
substring ("")
—
substring contains the substring that replaces length bytes at offset in string.
offset (0)
—
offset determines the number of bytes into string where the function places substring.
length (len. of substring)
—
length determines the number of bytes in string to replace with substring. If substring is empty, length bytes are deleted starting at offset.
result string
—
result string contains the edited string with the replaced bytes.
replaced substring
—
replaced substring contains the bytes that were replaced in string. |
The Replace Substring function deletes length bytes in string starting at offset, and replaces the deleted portion with substring. If length is 0, the Replace Substring function inserts substring at offset. If substring is empty, the Replace Substring function deletes length bytes at offset.
string
—
offset (0)
—
result string
—