ComfyUI > Nodes > comfyui-adaptiveprompts > String Split ⛓️‍💥

ComfyUI Node: String Split ⛓️‍💥

Class Name

StringSplit

Category
adaptiveprompts/utils
Author
Alectriciti (Account age: 5005days)
Extension
comfyui-adaptiveprompts
Latest Updated
2025-11-05
Github Stars
0.05K

How to Install comfyui-adaptiveprompts

Install this extension via the ComfyUI Manager by searching for comfyui-adaptiveprompts
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-adaptiveprompts in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

String Split ⛓️‍💥 Description

Divide string into parts based on delimiter and indices for precise text manipulation and data extraction.

String Split ⛓️‍💥:

The StringSplit node is designed to divide a given string into three distinct parts based on a specified delimiter and range indices. This node is particularly useful for breaking down complex strings into manageable sections, allowing you to focus on specific parts of the text. By specifying start and end indices, you can extract a middle section of the string while also obtaining the text before and after this section. This functionality is beneficial for tasks that require precise text manipulation, such as processing prompts or extracting specific data from a string. The node ensures that the indices are within valid ranges and automatically adjusts them if necessary, providing a robust and user-friendly experience.

String Split ⛓️‍💥 Input Parameters:

text

The text parameter is the string that you want to split. It serves as the main input for the node, and the entire operation revolves around dividing this string into parts. There are no specific minimum or maximum values for this parameter, as it can be any string of any length.

start

The start parameter indicates the starting index for the middle section of the string. It determines where the extraction of the middle part begins. The value should be a non-negative integer, and the node will automatically adjust it to ensure it is within the valid range of the string's parts.

end

The end parameter specifies the ending index for the middle section of the string. It marks the point where the extraction of the middle part ends. Like the start parameter, it should be a non-negative integer, and the node will adjust it to ensure it is within the valid range.

delimiter

The delimiter parameter is the character or string used to split the main text into parts. It defines how the string is divided, and if not provided, the node defaults to using a comma (,). This parameter is crucial for determining the boundaries of the split sections.

String Split ⛓️‍💥 Output Parameters:

before

The before output is the portion of the string that appears before the specified middle section. It includes all text from the start of the string up to, but not including, the start index. This output is useful for retaining the initial part of the string that precedes the main area of interest.

middle

The middle output is the extracted section of the string between the start and end indices. It represents the main focus of the split operation and is the part of the string you are most interested in analyzing or manipulating.

after

The after output is the portion of the string that follows the specified middle section. It includes all text from the end index to the end of the string. This output is useful for retaining the trailing part of the string that comes after the main area of interest.

String Split ⛓️‍💥 Usage Tips:

  • Use the delimiter parameter to effectively split strings that contain specific separators, such as commas or semicolons, to ensure accurate division of the text.
  • Adjust the start and end indices to focus on different sections of the string, allowing you to extract and analyze specific parts without altering the original text.

String Split ⛓️‍💥 Common Errors and Solutions:

Invalid delimiter

  • Explanation: If the delimiter is not specified or is an empty string, the node defaults to using a comma, which might not be suitable for your text.
  • Solution: Always specify a delimiter that matches the structure of your string to ensure accurate splitting.

Start index greater than end index

  • Explanation: If the start index is greater than the end index, the node will automatically swap them to maintain a valid range.
  • Solution: Ensure that the start index is less than or equal to the end index to avoid automatic adjustments and achieve the desired output.

String Split ⛓️‍💥 Related Nodes

Go back to the extension to check out more related nodes.
comfyui-adaptiveprompts
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.