子串提取
按1-based起点与长度提取子串;支持Unicode显示字素/码点索引、整段/逐行处理、结果反转、长度0与越界行为、复制与TXT下载。
使用步骤
如何使用
- Enter text up to 100,000 characters.
- Choose the 1-based start position, extraction length, index unit, per-line processing, and optional reversal.
- Extract the substring, review empty or shortened results, then copy it or download a text file.
Defined 1-based range behavior
Start position 1 selects the first unit. Length 0 intentionally returns an empty substring. A range that reaches past the end returns the available remainder, while a start beyond the text returns an empty result. Negative, decimal, or excessively large values are rejected rather than silently changed.
Choose a Unicode index unit
Displayed-grapheme mode uses browser grapheme segmentation so combining marks, flags, emoji modifiers, and ZWJ sequences stay intact. Code-point mode exposes the underlying Unicode scalar sequence and can separate those components. Per-line mode applies the same range independently to every LF-separated line and preserves empty lines; optional reversal uses the selected unit.
常见问题
你可能还想知道
Why is the first position 1 instead of 0?
The user-facing range is deliberately 1-based: position 1 means the first selected unit. The result message repeats the position and unit used.
What happens when the requested length is too large?
The tool returns every available unit from the start position to the end. It does not add padding.
Can this split an emoji?
Displayed-grapheme mode keeps a visible emoji sequence together. Code-point mode can expose and separate the code points inside a flag, modifier sequence, or joined emoji.