降順で並び替え
ナビゲーションに移動
検索に移動
編集中の文書の行を降順で並べ替えます。
// -----------------------------------------------------------------------------
// 降順で並べ替え
//
// Copyright (c) Kuro. All Rights Reserved.
// www: http://www.haijin-boys.com/
// -----------------------------------------------------------------------------
if (document.selection.Text == "")
document.selection.SelectAll();
document.selection.Text = document.selection.Text.split("\n").sort(
function(a, b) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
).join("\n");
document.selection.StartOfDocument();
スポンサーリンク