ComfyUI Node
String Formatter [OLD]
Construct the formatted string from template and format-dictionary.
String Formatter [OLD]
- dict
- string
◄template—►
◄recursive_formatfalse►
◄safe_formattrue►
◄show_statustrue►
CategoryString Constructor/_old
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| template | STRING | Type the text template. To reference named substrings from format-dictionary, use this syntax: {substring_name}. For example: score_9, score_8_up, score_7_up, {char1_short}, standing next to {char2_short}, {char1_long} {char2_long} | |
| recursive_format | BOOLEAN | false | Do recursive format - i.e., allow the chunks from the dictionary to reference other chunks. |
| safe_format | BOOLEAN | true | If template contains an invalid {text pattern} which can't be formatted - leave it as-is (instead of throwing an error). Safe mode is recommended for templates with JSON, CSS, or other literal curly brackets. |
| show_status | BOOLEAN | true | Show the final string constructed from the text-template and format-dictionary? |
| dictopt | DICT | The dictionary to take named sub-strings from. It could be left unconnected, if the pattern doesn't reference any sub-strings - then, this node acts exactly the same as a regular string-primitive node. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |