🧱 拆成 Unicode 片段Split Unicode Into Fragments
按分隔符或固定字素长度拆成多段,一行一段。本地处理。可设置「方式」、「字素长度」、「分隔符」。Split into fragments by a separator or a fixed number of graphemes, one per line. Processed locally. Settings: Mode, Grapheme length, Separator.
使用说明与常见问题How-to & FAQ
「拆成 Unicode 片段」是什么?What is the Split Unicode Into Fragments tool?
按分隔符或固定字素长度拆成多段,一行一段。本地处理。可设置「方式」、「字素长度」、「分隔符」。Split into fragments by a separator or a fixed number of graphemes, one per line. Processed locally. Settings: Mode, Grapheme length, Separator.
如何使用「拆成 Unicode 片段」?How do I use the Split Unicode Into Fragments tool?
在「拆成 Unicode 片段」中,把内容粘贴或输入到上方输入框,按需设置「方式」、「字素长度」、「分隔符」,结果会实时显示在下方,点击「复制结果」即可复制。In the Split Unicode Into Fragments: Paste or type into the input box, adjust "Mode", "Grapheme length", "Separator"; the result appears below instantly — click "Copy result" to copy it.
两种方式有什么区别?What do the two modes do?
“固定长度”每段取 N 个字素,最后一段可能更短,不会把 Emoji 拆开;“按分隔符”在每个分隔符处切开,分隔符本身去掉,相邻分隔符之间的空段会保留为空行。分隔符里 \n 表示换行,\t 表示制表符,\\ 表示一个反斜杠。Fixed length takes N graphemes per part, the last part may be shorter, and emoji are never split. By separator cuts at each separator, drops the separator itself and keeps empty parts between adjacent separators as blank lines. In the separator, \n means a line break, \t a tab and \\ one backslash.
什么是字素(字素簇)?What is a grapheme (grapheme cluster)?
字素(字素簇)就是看到的一个字符,它可能由好几个码位组成:例如 é 可以是 e 加一个组合重音符,👨👩👧 是用零宽连接符连起来的 5 个码位,🇹🇼 是两个区域指示符。本页按 Unicode 规则(UAX #29,即浏览器的 Intl.Segmenter)切分字素,所以这些都算 1 个,不会被拆开。A grapheme (grapheme cluster) is one user-perceived character, which can be made of several code points: é can be e plus a combining accent, 👨👩👧 is five code points joined by zero-width joiners, and 🇹🇼 is two regional indicators. This page splits graphemes with the Unicode rules (UAX #29, the browser's Intl.Segmenter), so each of these counts as 1 and is never broken apart.
输入和输出是什么样的?What does the input and output look like?
例如在「拆成 Unicode 片段」中输入 abcd,「方式」设为 固定长度,「字素长度」设为 2,输出为:ab ⏎ cd(⏎ 表示换行)。For example, the Split Unicode Into Fragments turns the input abcd, "Mode" set to Fixed length, "Grapheme length" set to 2 into: ab ⏎ cd (⏎ marks a line break).
有哪些选项可以调整?What options can I adjust?
「拆成 Unicode 片段」的设置:「方式」可选 固定长度、按分隔符(默认 固定长度);「字素长度」默认 1;「分隔符」默认 ,。每次生成结果都按当前设置处理。Settings in the Split Unicode Into Fragments — "Mode": Fixed length, By separator (default Fixed length); "Grapheme length" default 1; "Separator" default ,. The result always uses the current settings.
处理大段文本会卡吗?Can it handle long text?
「拆成 Unicode 片段」在浏览器中直接处理,几 MB 以内的文本通常瞬间完成;文本不会离开你的设备。The Split Unicode Into Fragments runs in your browser; text up to a few MB is usually processed instantly and never leaves your device.
「拆成 Unicode 片段」免费吗?需要注册吗?Is the Split Unicode Into Fragments free? Do I need an account?
「拆成 Unicode 片段」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Split Unicode Into Fragments is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.