Trim Removes heading and trailing whitespaces in the string. Uses single internal buffer. Use for one string at a time.