Template:Trim

Takes any string as an argument, and removes spaces and line breaks at the beginning and the end.

Example: gives:
 * "a
 * b"

(without the quotation marks)