Visit ComfyUI Online for ready-to-use ComfyUI environment
Clean up text by removing unwanted whitespace, enhancing readability and consistency for text data.
The StringTrim
node is designed to help you clean up your text by removing unwanted whitespace from your strings. This node is particularly useful when you need to ensure that your text data is tidy and free from leading, trailing, or both types of spaces that might have been inadvertently added during data entry or processing. By using this node, you can enhance the readability and consistency of your text, which is crucial for both aesthetic and functional purposes, such as preparing data for further processing or ensuring uniformity in text presentation. The StringTrim
node offers flexibility by allowing you to choose whether to trim spaces from both ends of the string, just the left side, or just the right side, making it a versatile tool for text manipulation.
The string
parameter is the text input that you want to trim. It can be a single line or multiline string, and the node will process it to remove unwanted spaces based on the selected mode. This parameter is crucial as it determines the content that will be cleaned up.
The mode
parameter allows you to specify how the trimming should be applied to the input string. It offers three options: "Both", "Left", and "Right". "Both" will remove spaces from both the beginning and end of the string, "Left" will remove spaces only from the start, and "Right" will remove spaces only from the end. This parameter is essential for customizing the trimming operation to suit your specific needs.
The output string
is the result of the trimming operation. It is the cleaned-up version of the input string, with spaces removed according to the selected mode. This output is important as it provides you with a neatly formatted string, ready for further use or display.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.