「昇順で並び替え」の版間の差分

提供: MeryWiki
ナビゲーションに移動 検索に移動
編集の要約なし
MSY-07 (トーク | 投稿記録)
タグとURLの修正
1行目: 1行目:
編集中の文書の行を昇順で並べ替えます。
編集中の文書の行を昇順で並べ替えます。


<source lang="javascript">
<syntaxhighlight lang="javascript">
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// 昇順で並べ替え
// 昇順で並べ替え
//
//
// Copyright (c) Kuro. All Rights Reserved.
// Copyright (c) Kuro. All Rights Reserved.
// www:    http://www.haijin-boys.com/
// www:    https://www.haijin-boys.com/
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------


13行目: 13行目:
document.selection.Text = document.selection.Text.split("\n").sort().join("\n");
document.selection.Text = document.selection.Text.split("\n").sort().join("\n");
document.selection.StartOfDocument();
document.selection.StartOfDocument();
</source>
</syntaxhighlight>

2023年5月26日 (金) 04:19時点における版

編集中の文書の行を昇順で並べ替えます。

// -----------------------------------------------------------------------------
// 昇順で並べ替え
//
// Copyright (c) Kuro. All Rights Reserved.
// www:    https://www.haijin-boys.com/
// -----------------------------------------------------------------------------

if (document.selection.Text == "")
  document.selection.SelectAll();
document.selection.Text = document.selection.Text.split("\n").sort().join("\n");
document.selection.StartOfDocument();
スポンサーリンク