Fixed trim() method for issue #25

Logic error was returning the string unchanged