Sort Lines

Share actions you've created here.
Post Reply
Vince
3D Clipboard Author
Posts: 22
Joined: Tue Jul 05, 2011 5:25 pm

Sort Lines

Post by Vince » Thu Jul 21, 2011 9:50 pm

Here's a quick 'one-liner' to sort the lines of a string. VBScript doesn't provide a native sort function, so JScript was used:

Code: Select all

Clipboard.Value = Clipboard.Value
  .split("\r\n")
  .sort()
  .join("\r\n");

Post Reply