Inserts, deletes, or replaces a substring at the offset you specify in string.


icon

Inputs/Outputs

  • cstr.png string —

    string is the string in which you want to replace bytes.

  • cstr.png substring ("") —

    substring contains the substring that replaces length bytes at offset in string.

  • ci32.png offset (0) —

    offset determines the number of bytes into string where the function places substring.

  • ci32.png 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.
  • istr.png result string —

    result string contains the edited string with the replaced bytes.

  • istr.png 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.