🔄 列表循环移动(旋转列表顺序)Rotate a List
把列表循环移动指定的位数:向左移动时开头的项目依次移到末尾,向右移动时末尾的项目移到开头,移动位数可超过列表长度(自动取余),也可以用负数反向移动。自动识别换行、逗号等分隔符并按原分隔符输出。适合轮值排班、轮换顺序、循环队列和密码学练习,数据在本地处理。Rotate a list by a number of positions. Rotating left moves items from the start to the end; rotating right moves items from the end to the start. The amount can be larger than the list (it wraps around) or negative to go the other way. Separators such as new lines and commas are detected automatically and kept in the output. Handy for duty rotas, turn orders, circular queues and cipher practice. Processed locally.
使用说明与常见问题How-to & FAQ
「列表循环移动(旋转列表顺序)」是什么?What is the Rotate a List tool?
把列表循环移动指定的位数:向左移动时开头的项目依次移到末尾,向右移动时末尾的项目移到开头,移动位数可超过列表长度(自动取余),也可以用负数反向移动。自动识别换行、逗号等分隔符并按原分隔符输出。适合轮值排班、轮换顺序、循环队列和密码学练习,数据在本地处理。Rotate a list by a number of positions. Rotating left moves items from the start to the end; rotating right moves items from the end to the start. The amount can be larger than the list (it wraps around) or negative to go the other way. Separators such as new lines and commas are detected automatically and kept in the output. Handy for duty rotas, turn orders, circular queues and cipher practice. Processed locally.
如何使用「列表循环移动(旋转列表顺序)」?How do I use the Rotate a List tool?
在「列表循环移动(旋转列表顺序)」中,把内容粘贴或输入到上方输入框,按需设置「输入分隔符」、「自定义」、「移动位数」、「方向」,结果会实时显示在下方,点击「复制结果」即可复制。In the Rotate a List: Paste or type into the input box, adjust "Input separator", "Custom", "Positions", "Direction"; the result appears below instantly — click "Copy result" to copy it.
向左和向右有什么区别?What's the difference between left and right?
向左移动 1 位:第一项移到最后,其余项前移,例如 A B C D → B C D A;向右移动 1 位:最后一项移到最前,A B C D → D A B C。移动位数等于列表长度时恢复原样,超过时自动取余;负数表示反方向。Rotating left by 1 moves the first item to the end and shifts the rest forward: A B C D → B C D A. Rotating right by 1 moves the last item to the front: A B C D → D A B C. Rotating by the list's length gives the original back, larger amounts wrap around, and negative numbers go the other way.
可以用来排班吗?Can I use it for rotas?
可以。把值班人员按顺序列好,每周向左移动 1 位,就得到下一周的顺序;移动 k 位即可直接得到 k 周后的安排。Yes. List the people in order and rotate left by 1 for each new week; rotating by k gives the order k weeks from now.
分隔符是怎么自动识别的?How is the separator detected automatically?
“自动识别”按以下顺序判断:有换行就按行分隔,否则依次检查 Tab、分号、逗号(含中文逗号和顿号)、竖线,最后才是空格。用逗号、分号或 Tab 分隔时支持 CSV 式的双引号,例如 "北京, 中国" 会被当作一项。需要其他符号时选择“自定义”,可用 \n 和 \t 表示换行和 Tab。输出沿用原来的分隔符(包括自定义分隔符和中文逗号),含分隔符的项会重新加上双引号;空行默认忽略,不算作项目。Auto-detect works in this order: if there are line breaks, each line is an item; otherwise it checks for tabs, semicolons, commas (including the Chinese comma and enumeration comma), pipes and finally spaces. With comma, semicolon or tab separators, CSV-style double quotes are honoured, so "Paris, France" counts as one item. Choose Custom for anything else; \n and \t stand for a new line and a tab. The output keeps the original separator (including a custom one or the Chinese comma), items that contain the separator are quoted again, and blank lines are ignored by default.
输入和输出是什么样的?What does the input and output look like?
例如在「列表循环移动(旋转列表顺序)」中输入 a ⏎ b ⏎ c ⏎ d,「移动位数」设为 1,输出为:b ⏎ c ⏎ d ⏎ a(⏎ 表示换行)。For example, the Rotate a List turns the input a ⏎ b ⏎ c ⏎ d, "Positions" set to 1 into: b ⏎ c ⏎ d ⏎ a (⏎ marks a line break).
有哪些选项可以调整?What options can I adjust?
「列表循环移动(旋转列表顺序)」的设置:「输入分隔符」可选 自动识别、换行、逗号、分号、Tab、空格等(默认 自动识别);「自定义」可留空;「移动位数」默认 1;「方向」可选 向左(开头移到末尾)、向右(末尾移到开头)(默认 向左(开头移到末尾))。改动任一选项后结果会按新设置重新生成。Settings in the Rotate a List — "Input separator": Auto-detect, New line, Comma, Semicolon, Tab, Space, etc. (default Auto-detect); "Custom" optional; "Positions" default 1; "Direction": Left (start goes to end), Right (end goes to start) (default Left (start goes to end)). Changing any option regenerates the result with the new setting.
处理大段文本会卡吗?Can it handle long text?
「列表循环移动(旋转列表顺序)」在浏览器中直接处理,几 MB 以内的文本通常瞬间完成;文本不会离开你的设备。The Rotate a List runs in your browser; text up to a few MB is usually processed instantly and never leaves your device.
「列表循环移动(旋转列表顺序)」免费吗?需要注册吗?Is the Rotate a List free? Do I need an account?
「列表循环移动(旋转列表顺序)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Rotate a List is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.