ComfyUI Node
CB String List Match Index ⚡️
Compares an input string against a list using custom matching rules. Returns a 1-based index if matched, or 0 if not found.
CB String List Match Index ⚡️
- index
- matched
◄input_string►
◄string_listapple
banana
cherry►
◄delimiternewline►
◄match_modeEqual►
◄case_sensitivetrue►
CategoryCoolB Nodes ⚡️
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | The target text you want to search for in the list. | |
| string_list | STRING | apple banana cherry | The list of existing strings to look through. Format based on your chosen delimiter. |
| delimiter | COMBO | newline | How the string list is split. Choose 'newline' if each item is on its own line. |
| match_mode | COMBO | Equal | How the input string should match items in the list. 'Equal' requires an exact match. |
| case_sensitive | BOOLEAN | true | If True, 'Apple' and 'apple' will be treated as different strings. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| index | INT | — |
| matched | BOOLEAN | — |