How to remove leading or trailing spaces from copy/paste operations?
There´s an app for that.
ClipMenu besides keeping a clipboard history it is possible to assign scripts to the entries.
(1) You copy as usual
(2) click on ClipMenu's status bar icon, select your latest entry, and use a user-selectable key-click command to perform LTrim or RTrim on the entry.
ClipMenu is freeware.