Visit ComfyUI Online for ready-to-use ComfyUI environment
Perform logical operations on strings for text manipulation, comparison, containment, and relationship evaluation, providing boolean results based on conditions.
The string_logic
node is designed to perform various logical operations on strings, making it a versatile tool for text manipulation and analysis. This node allows you to compare, check for containment, and evaluate relationships between two strings, providing a boolean result based on the specified condition. It is particularly useful for tasks that require conditional logic based on string content, such as filtering, validation, and dynamic text processing. By leveraging this node, you can automate complex string evaluations and streamline your workflow, enhancing the efficiency and accuracy of your AI-driven projects.
This parameter specifies the type of logical operation to be performed between two strings. The available options are: "A contain B", "A not contain B", "A relate to B", "A not relate to B", "A equal B", "A not equal B", "A is null", and "A is not null". Each option dictates a different type of comparison or check, influencing the node's output. The default value is "A contain B".
This is the first string input for the logical operation. It represents the primary string that will be evaluated against the condition specified in the option
parameter. This parameter is optional and can be left empty if the condition does not require it.
This is the second string input for the logical operation. It is used as the reference or comparison string against stringA
based on the condition specified in the option
parameter. This parameter is optional and can be left empty if the condition does not require it.
This output returns stringA
if the specified condition is met. It is useful for conditional text processing where you need to retain the original string when a condition is true.
This output returns stringA
if the specified condition is not met. It allows you to handle cases where the condition fails, providing an alternative string output.
This boolean output indicates whether the specified condition is true. It returns True
if the condition is met, enabling you to use this result in further logical operations or decision-making processes.
This boolean output indicates whether the specified condition is false. It returns True
if the condition is not met, allowing you to handle negative cases in your workflow.
option
parameter to specify the exact logical operation you need, ensuring that the node performs the correct comparison or check.is_true
and is_false
outputs with other nodes to create complex conditional workflows based on string evaluations.if
and else
outputs to manage different scenarios in your text processing tasks, providing alternative outputs based on the condition's result.stringA
or stringB
) is None
and the operation requires a valid string.stringA
and stringB
are provided and are valid strings when required by the selected option
.stringB
is not found in stringA
during a containment check.stringB
is correctly specified and exists within stringA
if the operation requires containment.option
parameter.option
parameter is set to one of the predefined valid options: "A contain B", "A not contain B", "A relate to B", "A not relate to B", "A equal B", "A not equal B", "A is null", or "A is not null".© Copyright 2024 RunComfy. All Rights Reserved.