Replace Substring

Deletes a specified length of characters in a string and replaces the deleted portion with another string.

1378

Inputs/Outputs

datatype_icon

string

The string in which you want to replace characters.

datatype_icon

substring

Substring that replaces a specified length of characters in the input string.

Default value: Empty string

datatype_icon

offset

The number of characters into the string at which the node places the substring.

Note A character refers to a code point, a numeric unit between 0 and 10FFFF16, defined by the Unicode standard for encoding. For more information about code points, research Unicode.

Default value: 0

datatype_icon

length

The number of characters the substring will replace in the input string.

If the substring is empty, the specified length of characters is deleted starting at the offset.

Note A character refers to a code point, a numeric unit between 0 and 10FFFF16, defined by the Unicode standard for encoding. For more information about code points, research Unicode.

Default value: 0

datatype_icon

result string

The edited string that includes the replaced characters.

datatype_icon

replaced substring

Characters that were replaced in the string.

Reducing Performance Burden

Characters in UTF-8 can be multiple bytes so string nodes count the number of characters in a string instead of jumping to a point in memory. Since the length and offset parameters are in units of characters, avoid nesting this node with large strings because that can create exponential functions that carry a higher performance burden.