trim function

Trim leading and trailing white space from a string.