Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate presence/absence of substring in text for conditional text analysis and dynamic operations in AI workflows.
The LayerUtility: StringCondition node is designed to evaluate whether a specified substring is present or absent within a given text string. This node is particularly useful for AI artists who need to perform conditional checks on text data, enabling dynamic and context-sensitive operations based on the presence or absence of specific keywords or phrases. By leveraging this node, you can streamline workflows that depend on text analysis, ensuring that subsequent actions are only executed when certain textual conditions are met. This can be especially beneficial in scenarios where text-based triggers or filters are required to control the flow of operations.
This parameter represents the main text string that you want to evaluate. It is a required input and should be provided as a single-line string. The text parameter is the primary source of data against which the substring condition will be checked.
This parameter specifies the type of condition to apply to the text. It accepts two options: "include" and "exclude". When set to "include", the node checks if the substring is present in the text. When set to "exclude", the node checks if the substring is absent from the text. This parameter determines the nature of the conditional check and is crucial for defining the logic of the operation.
This parameter represents the substring that you want to search for within the main text. It is a required input and should be provided as a single-line string. The sub_string parameter is the specific text fragment that the node will look for, based on the condition specified.
This output parameter is a boolean value that indicates the result of the conditional check. It returns True
if the condition is met (i.e., the substring is included or excluded as specified) and False
otherwise. This boolean output can be used to control the flow of subsequent operations based on the result of the text evaluation.
This output parameter is a string representation of the boolean result. It returns "True" or "False" based on the outcome of the conditional check. This string output can be useful for logging, debugging, or displaying the result in a more readable format.
© Copyright 2024 RunComfy. All Rights Reserved.