Command Clipboard Trim

The TrimClipboard command removes leading and trailing whitespace from the clipboard content.

Example

In the following expansion:

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