列表截取
按数量保留列表开头或末尾项目;支持字面量输入/输出分隔符、修剪、空项控制、复制与TXT下载。0项返回空结果,数量越界返回全部,保留项目原顺序。
使用步骤
如何使用
- Paste a list up to 100,000 characters and choose its literal input separator.
- Enter how many items to keep, choose the beginning or end, and set cleanup rules.
- Truncate the list, review the retained items, then copy them or download a text file.
Keep a prefix or suffix
Choose the beginning to keep the first N retained items or the end to keep the last N. A count of zero returns an empty result, while a count larger than the list returns every retained item. The tool never reorders the selected items.
Literal separators with bounded input
Choose newline, comma, tab, semicolon, or one to 20 literal custom characters for input and output. Regular expressions are never executed. Optional trimming and empty-item removal happen before the count is applied. Input is limited to 50,000 parsed items and output to 500,000 characters.
常见问题
你可能还想知道
What happens when the count is larger than the list?
Every retained item is returned in its original order.
Can I keep items from the end?
Yes. Choose End of the list; the last N items are retained without reversing them.
Does zero mean keep everything?
No. A count of zero intentionally returns an empty result. Use a count at least as large as the list to keep everything.