Visit ComfyUI Online for ready-to-use ComfyUI environment
Transforms long text into a list of substrings using a specified delimiter for easier processing and analysis.
The LongTextToList
node is designed to transform a long string of text into a list of substrings based on a specified delimiter. This node is particularly useful when you need to process or analyze text data that is structured in a continuous format but logically divided into segments. By converting the text into a list, you can easily access and manipulate individual segments, making it easier to perform operations such as searching, sorting, or further processing. The node also allows you to retrieve a specific segment from the list by specifying its index, providing a convenient way to focus on particular parts of the text. This functionality is essential for tasks that involve text parsing, data extraction, or any scenario where text needs to be broken down into manageable pieces.
The text
parameter is a multiline string input that represents the long text you wish to split into a list. This parameter is crucial as it contains the data that will be processed by the node. The default value is an empty string, and it supports multiline input, allowing you to input large blocks of text without restrictions.
The i
parameter is an integer that specifies the index of the substring you want to retrieve from the resulting list. This parameter allows you to directly access a specific segment of the text after it has been split. The default value is 0, with a minimum of 0 and a maximum of 99999, ensuring flexibility in accessing any part of the list.
The delimiter
parameter is a string that defines the character or sequence of characters used to split the text into a list. This parameter is essential for determining how the text is divided into segments. It can be customized to suit the structure of your text, and it supports special characters like newline (\n
) by using escape sequences.
The 下标i文本
output is a string that represents the specific segment of the text at the index specified by the i
parameter. This output is useful for directly accessing and utilizing a particular part of the text without needing to manually parse the entire list.
The 数组
output is a list of strings that contains all the segments of the text after it has been split by the delimiter. This output provides a comprehensive view of the text's structure, allowing you to perform various operations on each segment individually.
The 数组长度
output is an integer that indicates the total number of segments in the list. This output is helpful for understanding the size of the list and can be used to validate the index specified by the i
parameter or to iterate over the list.
数组
output instead of repeatedly specifying different indices.\\n
to ensure proper interpretation.i
is greater than or equal to the length of the list.i
parameter is within the valid range by checking the 数组长度
output before accessing the 下标i文本
.delimiter
parameter is an empty string, which is not allowed.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.