For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /nodes/09/StringSubstring.md.

子字符串(StringSubstring)

StringSubstringtext角色:文本工具

StringSubstring 节点用于从较长的字符串中提取一部分文本。它通过指定起始位置和结束位置来定义要提取的区间,并返回这两个位置之间的文本。

参数

参数类型默认 / 范围说明
stringSTRING多行文本文本输入。
startINT整数区间起始,可为负。
endINT整数区间结束,不含。

输出

输出类型说明
STRINGSTRING文本

怎么接

  • 上游:PrimitiveString / 上一级文本节点
  • 下游:CLIPTextEncode.text / SaveText / 其他文本节点
  • 接线:纯文本处理:上游接 PrimitiveString 或上一级文本节点,输出接 CLIPTextEncode 的 text、SaveText 或文件名参数,用来批量生成/改写提示词。

使用案例

从 string(多行文本)、start(整数)、end(整数) 开始填就能跑起来。典型接法:PrimitiveString → 本节点 → CLIPTextEncode.text。输出类型是 STRING,只能接同类型的输入端口,颜色对不上就是接错了。

端口与连线示意

StringSubstring 端口与连线示意

同类节点

保存文本 · 文本前添加 · 文本后添加 · 构建 JSON 提示(Ideogram) · 大小写转换器 · 数组转字符串 · 字典转字符串 · 从JSON提取字符串 · 融合文本序列 · 正则表达式提取 · 正则表达式匹配 · 正则表达式替换