mirror of
https://github.com/hanzoui/workflow-templates-broken-zap-2026-06-08.git
synced 2026-10-30 20:44:35 +00:00
1.1 KiB
1.1 KiB
StringReplace
Category: utils/string
Display Name: Replace
Also known as: find and replace, substitute, swap text
Description
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
The StringReplace node performs text replacement operations on input strings. It searches for a specified substring within the input text and replaces all occurrences with a different substring. This node returns the modified string with all replacements applied.
Inputs
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | String | ā | |
| find | String | ā | |
| replace | String | ā |
Outputs
| Output | Type |
|---|---|
| ), | |
| ] | |
| ) |
@classmethod
def execute(cls, string, find, replace):
return io.NodeOutput(string.replace(find, replace) | String |
Source: comfy_extras/nodes_string.py
Used in 1 template(s)