Command Clipboard Trim Right

The TrimRightClipboard command removes trailing whitespace from the clipboard content.

Example

In the following expansion:

{CopySelection}
{TrimRightClipboard}
{Paste}
  1. {CopySelection} copies the selection to the clipboard,
  2. {TrimRightClipboard} removes trailing whitespace from the clipboard content,
  3. and finally {Paste} pastes the clipboard content,
    thereby overwriting the selection with its version without trailing whitespace.