反向列表工具

使用此文本工具可就地反转或翻转列表。第一行成为最后一行,最后一行成为第一行。反转会将列表更改为新的颠倒顺序。顺序保持不变。它不会按字母降序(Z 到 A)对列表进行排序,但在从升序切换到降序时可以使用它,反之亦然。使用起来非常简单。只需将文本粘贴到框中,单击“反转”,瞧,您已成功反转文本的行顺序。

基本示例


输入反转
1
2
3
3
2
1

相关工具


'),childWindow.document.write(document.getElementById("input_output").value.replace(/\n/gi,"
")),childWindow.document.write(""),childWindow.print(),childWindow.document.close(),childWindow.close()}1==examples&&area.val("1\n2\n3\n4\n5\n6\n7\n8\n9\n10"),$("#reverseList").click(function(){Remember();var e=(e=area.val().replace(/\r\n|\r|\n/gm,"\n").split("\n")).reverse().join("\n");area.val(e),Toast("Reversed"),Remember()}),$(".clipboard").click(function(){Clipboard(area)}),$("#clearAll, #edit_delete, #file_new").click(function(){area.val(""),Remember()}),$("#file_upload").on("change",function(){loadText()}),$("#file_download").click(function(){saveText()}),$("#file_print").click(function(){printTextArea()}),$("#edit_undo").click(function(){var e=History.undo();void 0!==e&&area.val(e)}),$("#edit_redo").click(function(){var e=History.redo();void 0!==e&&area.val(e)}),$("#edit_copy").click(function(){Clipboard(area)}),$("#edit_select").click(function(){area.select().focus()});var History=function(){var n=[],t=0;return{remember:function(e){n[t-1]!==e&&(n.splice(t,10),n.push(e),n.splice(0,n.length-10),t=n.length)},undo:function(){if(1